Clean up duplicated code related to package download requests.
For Travis CI - switch CI build to use OS X build environment.