Only the last component of `path` is checked for a symlink and resolved. Realpath should resolve symlinks in all components.