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