adding missing dep mkdirp
fixing existsSync issue
minor clean up