(RE-2195) Exclude pkg directory when globbing gem

Previously, the gem task would build the generic gem, and
then build platform specific gems. However, the second gem
would include the previously built gem.

This commit excludes the pkg directory when globbing gem files.
Merge pull request #305 from joshcooper/ticket/master/RE-2195-exclude-pkg

(RE-2195) Exclude pkg directory when globbing gem
Address duplicate template use problem.

Without this change, if a template file is specified twice then there is a
possibility that it won't be found the second time because erb_file deletes the
given template file when done with it.

This change implements a usage count on each template file to ensure that only
the file only gets removed on the last use.

Signed-off-by: Wayne <wayne@puppetlabs.com>