Check for long lines before partial truncation.

Otherwise someone can make the bot (try to) print a very long line by
ensuring the output is more than 3 lines long, and the long line is
before the cut off, e.g.

     println!("{}\n\n\n", "x".repeat(1_000_000));