Use encoded string for insert in sys.path and print during main script. Fix #1022.
Merge pull request #1024 from normanjaeckel/FixUnicodeEncodeError

Use encoded string for insert in sys.path during main script. Fix #1022.