Add current version of lineReader, extracted from Crumbs.