fix bugs in readdir, mkdir and create