Better detection of xpath usage

The version of xpath on Fedora functions like the version that Apple has. Instead of making the syntax different only for Apple, parse the xpath usage.