implemented do_open in open.c. some error codes are left to be returned