expanded root path, ARDUINO_HOME env var or arduino_default_path()

def arduino_path():
    """expanded root path, ARDUINO_HOME env var or arduino_default_path()"""

    x = _ARDUINO_PATH
    if not x:
        x = os.environ.get('ARDUINO_HOME')

    if not x:
        x = arduino_default_path()

    assert x, str(x)

    x = path(x).expand().abspath()

    assert x.exists(), 'arduino path not found:' + str(x)
    return x