make object_id safe for more filesystems
make cleanup work in Win32
fix test for $! under Win32
quote $0 in regex
prevent locking more than once

some OSes (Win32) can't lock the same file twice in the same process
Merge pull request #368 from dakkar/issue/334

some Win32 fixes for Issue/334