Improve logging
Fix os specific patches

Automatically quit old driver when a new driver is created. Appium only supports
one active driver.
Rename last_driver global to driver.