Iterate through file object instead of readlines

readlines reads the entire file into memory; iteration prevents memory usage from exploding.
Merge pull request #1 from TimDumol/master

Iterate through file object instead of readlines