Write PosixPermissions and add a local implementation, and a bit of refactoring.

It's now possible to read and write file modes with something like:

some_file.attributes[PosixPermissions].group.write = True
some_file.attributes[PosixPermissions].sticky = True
Note to self