CLI: do not breed duplicate eof newlines #325