Add check whether env vars are already set.
Fixes #127
Merge pull request #129 from andymcc/sprint

Merged automatically by jenkins after successful gate test