Fix permissions on some directories and create missing directories.
Merge pull request #75 from aleibl/develop

Fix permissions on some directories and create missing directories.