Update tgz2dmg to use pkgbuild if packagemaker is unavailable.

Tested successfully on vanilla 10.9 so far. The pkgbuild process requires a "postinstall" vs "postflight" script. A few minor changes to support the build environment for pkgbuild are contained in postinstall.