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