Replace IO#lines with IO#each_line and IO#lineno. Fixes #7