Addedd support for  lock file

needed to be able to use LauchDaemon OSX plist file and the KeepAlive
option