Add support for writing pack index v2 files