write in progress

Tuan's code integrated. readdir and write started, but probably still
have errors