(maint) Fix template rejection

Previously the expand_templates called is_a? without invoking it against
an object. This meant that it was always false and so nothing was ever
rejected. The intended behavior was that templates that were part of
packaging itself would be excluded from the templates for the package.
This commit updates the is_a? call to be invoked on the temp object.
(maint) Add test for lib/packaging/tar.rb

This commit adds tests for the expand_templates method in tar.rb. It has
checks to verify that packaging templates are excluded from the tarball
and that expand_templates is invoked during a new tar object creation
when expected.
(maint) Add tests for the template method in tar.rb

This commit adds two tests for the template method in
lib/packaging/tar.rb. The first test verifies that the template method
correctly handles the distinction of hash vs string and uses the target
key in the hash instead of stripping off the extname of the template.
The second test simply validates that if the template cannot be found,
an error will be raised.
Merge pull request #292 from haus/ticket/master/re_1533_allow_template_mapping

(maint) Add tests for tar.rb and fix a bug