code: function getPathDirectory(length, parts) {
    if (!parts) {
      return '';
    }
    return parts
      .slice(length)
      .filter(part => part !== '')
      .join(path.sep);
  }
docs: Returns directory path
  @param {Number} length
  @param {Array} parts
  @returns {String} directory path