feat(write_files): Set default permissions to 0644

Fix #26
fix(write_files): Create directories with mode 0755

Fix #28
Merge pull request #29 from bcwaldon/permissions

Fix permissions-related bugs