When you get the error please run these tests on your Mac (not via ssh):
# This is what TextMate does and should fail, otherwise the issue is with TextMate
mv file~ file

This failed, as it seems unable to address the ~ file when accessing it over the share....

$ mv audio.js~ audio.js
mv: cannot move ‘audio.js~’ to ‘audio.js’: No such file or directory

$ ls -l audio.js~
-rwx------ 1 carpii staff 3412 Jul  1 12:19 audio.js~

$ cat audio.js~
cat: audio.js~: No such file or directory


I *think* what might be happening is that SMB is treating the audio.js~ as a mangled 8.3 character filename, like DOS used to use
Not 10% sure though, as I'd expect it to do it consistently if that were the case

There's a samba config option to supposedly disable filename mangling anyway, so I'll see if that helps