Cleanup I/O redirection code slightly;