added some more universal line ending support, added test with sample files