fixed has_shell_metachars detection when using env definitions

command lines like: BLAH=BLUB /bin/true
will fail with command not found otherwise.

MF: testcase added in tests/etc/2647.cfg

Signed-off-by: Sven Nierlein <sven@nierlein.de>
Signed-off-by: Michael Friedrich <Michael.Friedrich@netways.de>

fixes #2647