Correctly handle the case where sys.stdout is closed.
Correctly handle the case where sys.stdout is closed.

raboof/supybot,frumiousbandersnatch/supybot-code,Ban3/Limnoria,mazaclub/mazabot-core,kblin/supybot-gsoc,haxwithaxe/supybot,Ban3/Limnoria,buildbot/supybot,prashantpawar/supybot-rothbot,ProgVal/Limnoria-test,jeffmahoney/supybot,ProgVal/Limnoria-test,mazaclub/mazabot-core