Fix logical error

Actually the condition when to take a trace needs to be inverse.
This also rewrites the part of parsing the tracefile input, to
set the trace filename correctly when we have it already set as
environment variable.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>