Filter templates when calculating tags and categories

Prior to this change sphinx would consume the templates which include
templatized placeholders like "{{ tags }}", and these would show up in
the sidebar as literal tags and categories with zero counts.
Reduce a dry violation, and flake8 compliance
Merge pull request #79 from jmcfarlane/filter-out-templates

Filter templates when calculating tags and categories