Add a simple test for writePidfile.