pack: move open_pack_index(), parse_pack_index()