Better handling of permissions errors
Fix spacing
Merge pull request #23 from gzip/segfault

Better handling of permissions errors