index-pack: add a helper function to derive .idx/.keep filename