Fix bugs of simplitly create directory.