templates: Fix the template instantiation.

Templates now get copied properly into the current directory.