Make Android.prototype.getPageSource and
Android.prototype.getPageSourceXML also work under Windows:

Three Changes:
1) generate the temp file name using temp.path
2) split adb shell calls in 2 functions
3) remove temporary files