Moved mkdir.
Fixes some issues with PHP 5.4