Move the generation of the templer script into a
 perl script, for portability.