Added support for more than one template folder.