server: write pid file for backgrounded server to specified file