Synchronously create the cacheDir

ENOTDIR, error were thrown.
Merge pull request #10 from alexBaizeau/mkdirpSync

[BugFix] Synchronously create the cacheDir before writing to it.