Changed EOL detection to be more explicit

Previously, line split algorithm worked only because $eols was formed in
a lucky order. Right now it's immune to order of elements in $eols.