Keep STDOUT/STDERR the right mode. Fixes #422
Keep STDOUT/STDERR the right mode. Fixes #422

If you reopen STDOUT with an IO object that is "w+", then later reopen
it again as just "w", you get an exception:

`reopen': /dev/null can't change access mode from "w+" to "w" (ArgumentError)

eileencodes/puma,looker/puma,jbmyid/puma,tuvistavie/puma,matthewd/puma,unleashed/puma,puma/puma,kyledrake/puma,respire/puma,costi/puma,tuvistavie/puma,zapnap/puma,BenV/puma,jc00ke/puma,puma/puma,matthewd/puma,arturocadena/puma,snow/puma,snow/puma,ngpestelos/puma,costi/puma,jbmyid/puma,unleashed/puma,snow/puma,wallclockbuilder/puma,respire/puma,tuvistavie/puma,snow/puma,matthewd/puma,nathansamson/puma,tuvistavie/puma,zapnap/puma,jbmyid/puma,zBMNForks/puma,wallclockbuilder/puma,puma/puma,kyledrake/puma,matthewd/puma,kyledrake/puma,prathamesh-sonpatki/puma,jc00ke/puma,ngpestelos/puma,arturocadena/puma,costi/puma,unleashed/puma,prathamesh-sonpatki/puma,eileencodes/puma,ngpestelos/puma,looker/puma,eileencodes/puma,arturocadena/puma,BenV/puma,BenV/puma,respire/puma,zapnap/puma,eileencodes/puma,jc00ke/puma,costi/puma,looker/puma,zBMNForks/puma,looker/puma,prathamesh-sonpatki/puma,ngpestelos/puma,arturocadena/puma,BenV/puma,jc00ke/puma,zapnap/puma,zBMNForks/puma,nathansamson/puma,prathamesh-sonpatki/puma,jbmyid/puma,puma/puma,nathansamson/puma,zBMNForks/puma,nathansamson/puma,respire/puma,wallclockbuilder/puma,unleashed/puma,wallclockbuilder/puma,kyledrake/puma