fixes for python 3

This allows this tests to run to completion in python 3, and produces same output in python 3 as 2 now.

However, latest pip makes the test actually fail (in both) though the actual generated index looks good.
I'm guessing its changes to pip's bundling logic itself.