condump improvements

Default output file extension to ".txt"
Show output filename in error message.
Use Windows line endings on Windows.
Dynamically allocate line buffer. (by ZTM)