Fixed mkdirRecursive bug causing stack size error.