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