Fix permissions for createDir() on Unix systems.

Permissions were set to 0o711 by default; they should be 0o777, with
umask being responsible for restricting permissions further.
Merge pull request #1541 from rbehrends/mkdir-perms

Fix permissions for createDir() on Unix systems.