Fix deletion of PID file

Closes #70.