Moved templates into files

Modifying shell scripts inside a Perl script or having to copy-and-paste from there is annoying, so I moved the templates into files. I also fixed a small bug that happened after I manually deleted `/srv/$PACKAGE` but no `/etc/$PACKAGE`, so the install script failed.