pakmanaged.js
function mkdirSyncRecursive(dir) {
      var baseDir = path.dirname(dir);
    
      // Base dir exists, no recursion necessary
      if (fs.existsSync(baseDir)) {
        fs.mkdirSync(dir, parseInt('0777', 8));
        return;
      }
    
      // Base dir does not exist, go recursive
      mkdirSyncRecursive(baseDir);
    
      // Base dir created, can create dir
      fs.mkdirSync(dir, parseInt('0777', 8));
    }
function mkdirSyncRecursive(dir) {
      var baseDir = path.dirname(dir);
    
      // Base dir exists, no recursion necessary
      if (fs.existsSync(baseDir)) {
        fs.mkdirSync(dir, parseInt('0777', 8));
        return;
      }
    
      // Base dir does not exist, go recursive
      mkdirSyncRecursive(baseDir);
    
      // Base dir created, can create dir
      fs.mkdirSync(dir, parseInt('0777', 8));
    }
Recursively creates 'dir'