Bit of a mess of templating: substituting in file contents, or arbitrary strings.