normalizeAndResolvePath = pathname => {
  if (isSymbolicLink(pathname)) {
    const absPath = path.dirname(pathname)
    const targetPath = path.resolve(absPath, fs.readlinkSync(pathname))
    if (isFile(targetPath) || isDirectory(targetPath)) {
      return path.resolve(targetPath)
    }
    console.error(`Cannot resolve link target "${pathname}" (${targetPath}).`)
    return ''
  }
  return path.resolve(pathname)
}
Normalize the path into an absolute path and resolves the link target if needed.

@param {string} pathname The path or link path.
@returns {string} Returns the absolute path and resolved link. If the link target
                  cannot be resolved, an empty string is returned.