Do not loop forever after reaching start of file.
Merge pull request #139 from naure/master

Do not loop forever after reaching start of file.