Added half working sys_write & sys_read

passes 11 out of 15 tests.