Fixed ext2 read/write bugs