Support nested directories in TemplateProcessor