fix bug: E739: Cannot create directory: foo/bar/, but the directory was created just fine.