Fixed deep directory creation for command line utility
Using original existence check with mkdirp call on failure
Merge pull request #3101 from FredyC/master

Fixed deep directory creation for command line utility