Creates a directory - including parent directories if necessary and sets permissions on newly created directories.

GeneralUtility::mkdir_deep($folder);

To be continued...