Ensure folder permissions for dynamically created subfolders
Merge pull request #189 from KingCrunch/folder-permissions

mkdir() doesn't take care about the umask