Add repl-restart template for perl.
Add and test the repl-restart templates for perl, python and ruby.

Closes #57 and #32.