util/package: fixes `get_package_file` and test cases