Better template matching

Basically my drive for this was to be able to have a multiple templates for a given filename:

```
template.py
template.test.py
```

Such that if I edited a python file, I would get the more generic template.  However, if I edited a python file with a file name like `something_test.py` I would get the more specific template.

There are some other smaller changes that got wrapped up in this as well and if I have time, I will try to document them more (such as the debugging variable "g:templates_debug")

Let me know if there is anything I can improve upon.