Permissions check on org invitations, plus test cases.

Title says it all.  Fix for #119.  Fixes broken central server test suite as well.