Fixed bug that left lock file in place after running piped-in commands.