Support more template types.

Instead of only matching `.md` files, match markdown, textile, haml, slim, etc.

Also, escape '.' in regex patterns.