Add salt.utils.file_perms function

Converting the st_mode value from os.stat results to something usable
for os.chmod seemed like it would be a useful thing to have in
salt.utils, so this commit moves that functionality there.