Added ability to redirect std{in,out,err} to a file.