Fixed a bug in do_mkdir