Fix codefolding preprocessor for Python3

StringIO needs to be imported differently in Python3