Allow directory permissions to be a configurable option

This addresses #3