Fixed issues as per pull request conversation
Merge pull request #162 from pbouianov/mkdirp

Fixed issues as per pull request conversation