Fixed deprecated cStringIO.reset() call