Write pid file to a directory that doesn't get deleted