Working (but for the moment inefficient) get_package_contents helper