Better detection of template structure.

Now we can use the exact same structure for twig files that exists on http://wphierarchy.com/