Fix StringIO#write