Clean up the code around testPerms and testModTime
Clean up the code around testPerms and testModTime

Use "getModTime" and "getPerms" instead of repeating their codes.

Also, move "getPerms" to above the "getModTime", because "testPerms" is
above "testModTime".

mostafah/fsync