Add support for custom and disabling of pidfiles.