Fix BackgroundJobEnvironment, add tests to it

[#64676414]

Signed-off-by: Kris Kelly <kkelly@pivotallabs.com>
Don't pollute STDOUT in tests

Signed-off-by: Kris Kelly <kkelly@pivotallabs.com>