CSV new line compatibility

Compatibility for csv files with dos or unix encoding (^M is now handled)