Add ability to create a pidfile