More CPP test fixes

Following up the fixes from @JesseCorrington, these
commits should fix:

 * test/integration/permissions.cpp
 * test/unit/perms.cpp

And cleanup the whitespace of some classes at the same time.

/cc @rleigh-dundee