Add some tests for permissions and the add/remove methods of PermissionAttachment
Reorderd methods to be more logical and reworded and tweaked the javadocs