Fix bug in mkdir operation