Added support for template inclusion to leaf tool.

Templates are loaded relative to the parent directory of the file being
rendered.