Changed the default PID directory and added a commandline option