Now correctly deal with \r\n newlines.

Headers now remain in order, too.