Don't remove pid files of another running instance.

I noticed that pid files where removed when another running instance of a program was detected. Either because the pid file was locked or because there was a process with the pid from the pid file running. I think this is a bug. I extended the test cases to show the issue and adapted them so they will use /tmp instead /var/run as a default pid directory, so they can be run without superuser privileges.