Fixes some errors on syscall fork() and adds testing code for it. Seems to work well.