added folder creation and relative error handling
Merge pull request #543 from LorenzoBoccaccia/jshint-path-fix

added folder creation and relative error handling