Fix issue with getdelim

* Also set line variable whenever a realloc needs to be done.  Previous
code crashes whenever the data is larger than 1024.