Refactoring some long local export and test_must_fail sequences to the s...

...horter single line version.

Occurrences of 
```
[...] &&
(
        VAR=VAL &&
        export VAR &&
        test_must_fail git command
) &&
[...]
```
in the test scripts have been replaced by
```
[...] &&
test_must_fail env VAR=VAL git comand && [...]
```