(RE-1161) Expand templates before templatizing

Previously, templates could be globs that would expand to multiple files. This
was lost in the librarification of packaging, and this commit returns that
functionality. Templates are first expanded, flattened and filtered before
being evaluated later in tar.rb. This allows globs to be successfully used in
the templates field of the project_data.