Updated ftdetect, added twig support