Bugfixes by @chnorton and @avstudnitz

The fixes were needed for creating a package for FireGento_MageSetup. They include https://github.com/Flagbit/Magento-Packager/pull/2.