Fix to file.check_perms related to symlinks and chmod

Changing file.check_perms to only attempt to update permissions of a symlink if follow_symlinks is True. #13910