Switch from ERB to Erubis so the template file can be more Railsy.

This will also be good for when project files can contain ERB.
Simplify the shell template and add a debug option to output the shell script that is generated.