Bugfix in join dup operation.

We should be replacing a dup link on next only when every state in the
next list is in the join list.
Added bulider test to confirm that we are no longer seeing issues with dups
Wrote validator test to confirm joinDups issue resolved.
Merge pull request #114 from InABlender/xpath_fix

Problem with joinDups part of remove dups