Added backwards compatible way to do sanity checking on permissions and raise exceptions when you make a typo.