ENH: fix a problem to mkdirs