MJM: Retrofitted mkdirp to by sync