Refactor renderDocument to use a Writer instead of File
   * Writer is more modular
   * allows the Groovy template engine to gain access to the other rendering engines
   * so you can do "include 'freemarker-template.ftl' from a Groovy template