Add some permissions testing

This adds a tests module for permissions to test their creation,
assignment, and inheritance.