Fix bug where filename was not output with -c
Collapse calls to stdout.write
Fix bug with long lines.
Non POSIX files that have no terminating newline.