added file_exist check to $template to endure that the page template exi...

...sts

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>