Fixed bug in read_lines which prevented it from working with files