Fixed permissions error and made permissions a settable variable.

Permissions were being set by a string, not an integer.
Merge pull request #4 from skotos/master

Fixed permissions error and made permissions a settable variable.