gc.sh: make repack_gfi_packs more robust and scalable