Make refresh-env more resilient for users

If it isn't sourced perfectly it trashes $PATH among other things.

Change-Id: Ia606b68e5a95bd59ad0e2cf54e148d0bbbba9cbc
Merge "Make refresh-env more resilient for users"