getSubdirectoriesFromRoot = (rootPath, pathname) => {
  if (!path.isAbsolute(pathname)) {
    throw new Error('Invalid path!')
  }
  const relativePath = path.relative(rootPath, pathname)
  return relativePath ? relativePath.split(PATH_SEPARATOR) : []
}
Return all sub-directories relative to the root directory.

@param {string} rootPath Root directory path
@param {string} pathname Full directory path
@returns {Array<string>} Sub-directories relative to root.