Fix template filename for tempfile