This fixes the problem reported in D33468
The version check feels a bit unfortunate (on the other hand I didn't want to introduce a dependency on the external six module just for this). Maybe someone knows a better way?
I'm also not sure how to unittest this: I do not want to put a file with a non-ascii name into the repository. Can leave it without a test?
Could you make it work without checking version?
(I haven't tested yet)