Coerce output of file.get_mode to string
Merge pull request #4299 from jsdalton/fix_type_error_in_check_perms

Coerce output of file.get_mode to string