Ensure shell tests use isolated env variables set

Fixes bug 1161008.

Change-Id: Id9d76f39c898d4cff65aefa636e9dd2f092d42bd
Merge "Ensure shell tests use isolated env variables set"