Fix NULL derefence bug in first_line_from_file