Fix a bug where pidfile_open accepts a directory as optional argument, but proc tries to treat it as a file.
BUGZID: