lib/utils/downloadTemplateFromRepo.js/getPathDirectory
function getPathDirectory(length, parts) {
  if (!parts) {
    return '';
  }
  return parts
    .slice(length)
    .filter(part => part !== '')
    .join(path.sep);
}