(#11276) Tarball entries should be relative to the `pkg` directory

Commit 94f2f0a9 removed the call to `Dir.chdir`, which is necessary so
that entries in the tarball are relative to the `pkg` directory, i.e.
each entry starts with the metadata release_name, which is of the form:

    myuser-mydir-X.Y.Z/

This issue was caught by the `loadable_from_modules` acceptance test as
the newly installed module did not install its metadata in the expected
locations.

This commit restores the `Dir.chdir` behavior and updates the test.
Merge branch 'joshcooper-ticket/stable/11276-chdir-fix' into stable

* joshcooper-ticket/stable/11276-chdir-fix:
  (#11276) Tarball entries should be relative to the `pkg` directory
(maint) Fix puppet module build empty tar issue on Solaris

Without this patch `puppet module build` produces an empty tar file when
run on Solaris.  This is obviously a problem.  The root cause is that
tar defaults to writing the archive to the tape device instead of STDOUT
as was expected.

This patch fixes the problem by explicitly using `tar cf - ...` to write
the archive to STDOUT.

Paired-with: Andrew Parker <andy@puppetlabs.com>
Merge branch 'fix_solaris_module_pack'

* fix_solaris_module_pack:
  (maint) Fix puppet module build empty tar issue on Solaris
  (#11276) Tarball entries should be relative to the `pkg` directory