More IO redirection stuff

Moving things around, trying to get I/O redirection flowing