Python concat string, StringIO for string concatenation