Change how the index path spec is performed.

Signed-off-by: Aron Cedercrantz <aron@cedercrantz.se>