PUP-1681 Add chmod to the FileSystem abstraction

 - Refactor previous tests that forked the code path for setting mode
   based on Windows or POSIX
 - The rest of the call sites using File.chmod or FileUtils.chmod can
   be updated at a later date