Fix for JENKINS-24467 and new test case
Assert env var has expected value
Adapt environment test for git 1.7.10.4 special case

The test uses a modified environment in the first
build to confirm only the intentionally specified
portions of the modified environment are visible
to the polling which happens later in the test.

Git 1.7.10.4 fails the first build because it requires
that the PATH environment variable must include
the directory which contains the git executable.

Later versions of git don't have that requirement.
Assert that no error was reported to listener in environment test