Add allow_symlink argument to allow enforcing real directories.
Merge pull request #19069 from smoothify/allow_symlink

Add allow_symlink argument to allow enforcing real directories.