Added mac support

Also fixed the following
- added `set +e` so that the script exit on error
- support for multiple licences

To set up the ci for mac you need to create a branch and switch the .travis.yml to the one in this branch:
 https://github.com/sebv/android-sdk-installer/tree/mac-ci