Get list of directories `dir` from synchronously

@param {String} dir
@param {Function} cb
function getDirectoriesSync(dir) {
  return fs.readdirSync(dir)
      .filter(function(item){
        return fs.statSync(path.join(dir, item)).isDirectory();
      });
}