changing file modes for map files and directories