Reinout distutils script encoding fix for #65

The pull request contains:

- a test demonstrating the failure (including one test setup change)

- the fix

Note that I could have made even more elaborate tests, but as I would need to add more dummy eggs and would have to change the tests results in lot of places, I thought this test to be enough. The code is layed out in such a way that there's no untested code in the fix.