Replaces various hand-crafted replacements of varying format with a single Jinja2 templating mechanism. Allows full access to configuration if necessary.
Also introduces a separate constant for the sql directory, so that it can be put separately from the rest of the data if required.