Directory mode

Add new property `$directoryMode` along with public method `setDirectoryMode()` to enable control of the permissions of the created directories. Deffault mode is `0755`.

This PR is a simplified variation on #9 that is hopefully simpler to review and merge.