Support importing codegen'd files in jinja templates

The resolver wasn't looking in the bazel-out/k8-opt/bin (or similar)
directory.

Change-Id: I762c62c691ab6efdc9afb55238e964d2475111a0
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/tools/build_rules/template.bzl b/tools/build_rules/template.bzl
index 1ad06d8..d3547d8 100644
--- a/tools/build_rules/template.bzl
+++ b/tools/build_rules/template.bzl
@@ -8,7 +8,8 @@
         tools = [ctx.executable._jinja2],
         progress_message = "Generating " + out.short_path,
         outputs = [out],
-        command = ctx.executable._jinja2.path + " " + ctx.files.src[0].path + " '" + str(parameters) + "' " + out.path,
+        # TODO(james): Is the genfiles_dir the correct thing?
+        command = ctx.executable._jinja2.path + " " + ctx.files.src[0].path + " '" + str(parameters) + "' " + out.path + " " + ctx.genfiles_dir.path,
     )
 
     return [DefaultInfo(files = depset([out])), OutputGroupInfo(out = depset([out]))]