Added runtime cleanup for Smarty and Twig tests