Small bugfix to Python 3 import guard

Unfortunately my Python 3 import guard fix from a while ago subtly broke things on Python 2.6+

Turns out Python 2.6+ contains a backport of Python 3's `io.StringIO`module that behaves differently than `StringIO.StringIO` in combination with strings and unicode. 

This PR fixes this problem by reversing the order in which the imports are attempted.