Moved xpath into boostrap java

And removed complex-find while at it.

Submitting to @bootstraponline for review.

I'm working now on changing the getPageSource code to reuse the same code here.
I think you always do, the Android dumpHierarchy command itself writes to there.
In a lot of the edge cases you are mentioning an exception would be thrown. All Runtime exceptions get bubbled up and are returned by Appium as an "Unknown Error" with their error message (and I'll try to add stacktrace).

Really, if there's a problem with file permissions, or xml parsing, or any of that, it's really a problem that can't be addressed by appium.