templates_from_dir takes a file pattern

This way the function could be re-used to create templates from real rpm
files as well.

related to xenserver/planex#53