Actually returning error for bad mkdirs

- The test may be messed up