Python3 version, including fixed script generation.
Fixed the notoriginal option, and tested the script.
Merge