Add support for PID-file support

Ok this version of pid-support seems to work ok.. although honestly i'm not sure how much deleting the pid file really matters..