Check for missing variables within renderTemplate, to achieve

Hi edwindj,

I've attempted a fix at the bug request I posted where we'd like an options to check all variables in the template. I think this works with the trivial example I posted in the bug request, but could be tested more thoroughly. It works by performing the check within the renderTemplate, so this function needs to have the paramter "keys" for reporting the warning and needs the parameters "checkvars" to know if it is to check or not. The value for checkvars is passed through all enclosing functions neatly using ellipsis arguments.

Note, this is my first fork/pull request on github, so if anything looks odd let me know! Also I did the modifications in the checkvars as well - not sure if this is best?

Dan