smurf: Need to set status bad before calling errRep
smurf: Improve error reporting and cleanup for wordexp() call