Split the output string into lines lazily instead of replacing all line endings all at once.
Re-introduce the guava dependency, since it is already a transitive dependency and quite convenient.