Simplify iterating over file lines

The file object is iterating by lines by default, so there is no need to
do that explicitely.
Fixed stripping of last character in the line

In case of last line, there might be no \n and thus removing last char
will lead to losing it.
Merge pull request #25 from nijel/file-handling

File handling