added file_exist check to $template to endure that the page template exists
added twig file loaded extension to load template from string template_from_string function loads a template from a string
-- http://twig.sensiolabs.org/doc/functions/template_from_string.html 
Signed-off-by:shawnsandy <shawnsandy04@gmail.com>