Added permissions support

I've added support for the permissions parameter and cleaned up the documentation a bit.