Add a better test for service environment variables. Fix bugs.

Closes https://github.com/GoogleCloudPlatform/kubernetes/issues/876
ah, you're right, I missed it.