Support an optional pid file
Clean whitespace
Remove dead debug code
Merge pull request #8 from kormoc/pid_file

Support writing out a pid file