Fix PIDFILE folder check