fix path written to template

subimport expects paths to be posix-like.  This breaks on windows.  We
therefore have to replace all windows path separators to posix ones.
Generally, this is a big no-no, but is unavoidable in this case.