Cross platform newlines for csv upload

Excel on Mac uses Line Feed character ("\r") as line terminator for CSV files. Flask is not happy with it, and returns the content of the uploaded file in a stream that does not recognise LF as line separator, making the csv parser to throw an error.

This pull request fixes the problem.