Instead of discarding the last line, we can just strip it. Fixes https://github.com/xonsh/xonsh/issues/1180