Expand user home path in template search path.

cause that pretty much always what you want to do if you have a `~` ina
path.
Merge pull request #6495 from Carreau/expandpath

Expand user home path in template search path.