Register remove_pid_file with atexit (Fix #215)
Merge review 171 by @srh
Merge branch 'next' into sam_priorityqueue