fix #1525: unicode __file__ in Python2

The module __file__ attribute in Python2 should be str, not unicode.
When constructing the setup_py value in Python2 use the file system
encoding so repr(setup_py) in scripts does not expand to a unicode
value.