Fix a bug where compileTemplateFilesAndEmit inputDir parameter was not
bound properly when doing a dynamic compilation.