Remember to set errno if opening the PidFile fails.  This fixes a compiler
warning detected by travis-ci.