add dup2 to userlib. add dup2test.