Support readline history/completion by re-configuring stdout prior to cmdloop