chdir to working directory before accessing PID file