Use os.environ.get() instead of os.getenv().

Using os.getenv() seems to raise AttributError in the travis tests,
causing them to fail.