Remove un-used var defaultLockFilePath
Check commands with shell.which() (fixes #28)
Check for non-zero exit code explicitly