Correct OS X syscall classes

This handles the different classes of syscalls in XNU. It also adds a
call to puts() to test.c to demonstrate a correctly bound sys_write().