I worked this out - it was because I was passing a non-default template name as first argument. I found another forum page saying you could set temp dir in second argument, but I guess that's an old version of the class because you can't in this version. I found where to set the temp dir in the config INI file.