use 'env' instead of 'echo' for %ENV tests in magic.t

To prevent using weird echo commands (it can be a binary in the $PATH)
or shell quoting (Windows has env too?), use the env command.

The env command showed perfect content on old HP-UX 11.00 where the echo
command usage got it seriously wrong.
Merge remote-tracking branch 'remotes/origin/smoke-me/env-instead-of-echo' into blead