function createDirectory(filePath, cb) {
    var dirname = path.dirname(filePath);

    mkdirp(dirname, function (err) {
        if (!err) {
            cb();
        } else {
            console.error('Error creating directory: ', err);
        }
    });
}
function createDirectory(filePath, cb) {
    var dirname = path.dirname(filePath);

    mkdirp(dirname, function (err) {
        if (!err) {
            cb();
        } else {
            console.error('Error creating directory: ', err);
        }
    });
}
function createDirectory ( filePath , cb ) { var dirname = path . dirname ( filePath ) ; mkdirp ( dirname , function ( err ) { if ( ! err ) { cb ( ) ; } else { console . error ( 'Error creating directory: ' , err ) ; } } ) ; }
Creates the output dir
@param {String} filePath
@param cb
Creates the output dir