Also redirect standard output/error

This is necessary because the invalid handles might cause the child
process to crash.