Fixing issue where string-based permissions would not be parsed.

Signed-off-by: Ben Corlett <bencorlett@me.com>
Fixing issue with JSON encoding / decoding where all permissions are set to 0. Fixes #103.

Signed-off-by: Ben Corlett <bencorlett@me.com>