Allow to run Appium using sudo if it is still run be user who owns Appium files
Merge pull request #3655 from bem/feature/sudo-fix

Allow to run Appium using sudo if it is still run be user who owns Appium files
Change priority of methods to calculate device type
Simplify getDeviceType()