Fix intermittent dest dir create and then file write failures
Project should create missing destination dir if it does not exist.
Was using fs.mkdir which may or may not complete before attempting
a file write. Changed to use fs.mkdirSync.
Also removes this deprecation warning in node 7.x
(node:72327) DeprecationWarning: Calling an asynchronous function
without callback is deprecated.