Redirection for stdin and stdout both working.