Follup to #2463 which fixes a regression I noticed only Python 2.7.3 down to 2.7.0.  This provides a slightly reworked fix to single out StringIO.StringIO for special treatment and leave writing to interfaces that support the modern buffer interface.