This is sharing a trick only, at the moment.
Map an array list of directories to create with mkdir, and this avoids the need of recursion.
The default permissions are 777 when you pass no parameters to mkdir(). So:
$dirs = array(
'js',
'images',
'css',
'templates',
# .... more list
);
array_map('mkdir', $dirs);
This would a nice job.