Use longest path and priority to decide what error to display.
Fixed bug in xpathJoin opt where WELL_XML check is not correctly handled.
Merge pull request #206 from RackerWilliams/long-path

Use longest path from start when deciding what error message to display