Clean up the permissions code, fix the registration bug, and rename wild to accept_any_matching.

Signed-off-by: Tyler O'Meara <Tyler@TylerOMeara.com>