Close logrus writer when command finishes
fixes #1644 (closed)
When we added a pipe writer to turn multiple log lines into a single log line, we inadvertently stopped closing the logruswriter, resulting in the logrus goroutine being active after the test finished.