moved permission handlers into their own package.
basic implementation of support for zPermissions. Fixes #16.