Fix to create pidfile on Mac