Ensure the file ends in only a single newline, not three

The previous behavior was causing a failure on the V8 presubmit checks.