ENH: Iterate over, instead of loading into memory

If a file path was being passed to the method, all the contents would be
read into memory, instead, now the file-like object is casted into an
iterable and later closed.