Gallery: Revert directory creation mechanism and change it.

We now try to set `umask` and work with that instead of using `chmod`.