bunch of fixes to make appium more cross-platformy

@bootstraponline, some of these might fix outstanding appium issues, not sure.