add support for --pid argument to create pidfile