Add support for StringIO objects to readline