Partial implementation of remove path doubles.
Also added dupe group counter.