Added setting project directory passed as a parameter (second instance).