Locks are not inherited over fork.

So the highlanderizing must happen after the possible daemonizing.
Writing to the lock file was fine.