Travis CI fixes

This pull re-enables Travis CI builds for master, and skips tests if the required test variables are not present.