Moved the xpath escaping logic to a dedicated utility class.
Moved the XPath manipulation to a dedicated utility class

This makes testing this logic much easier.
Merge pull request #540 from stof/extract_xpath_utils

Extract xpath utils into dedicated classes