Changed default pid file name and added code to change directory to '/'