Make file.check_perms properly manage symlinks

This makes this function properly chown the symlink itself if
follow_symlinks=False.
Add follow_symlinks parameter to file.directory state
Merge pull request #12244 from terminalmage/issue12209

Add follow_symlinks param to file.directory state