derep: produces index file; tests