Avoid chmod() calls on directories
There are several reasons for that:
- the reason that triggered this patch is that the pledge() sandboxing system on OpenBSD forbids chmod() by default in many pledged applications. When one of these needs to rebuild the font cache it will fail because of these unneeded chmod() calls.
- trying to change existing directories access rights isn't a good idea
- and lastly doing mkdir() && chmod() is racy. Use umask() to make shure the directory is created with the proper access rights from start.
Signed-off-by: Matthieu Herrb firstname.lastname@example.org