Updated the twig template engine class

It seems I have been passing the wrong parameters for this and so the
caching would not have worked, So I updated as per the twig docs and
changed the tests to fit the update