Fix bug in mkdir