Fix getLineCount for correct progress reporting.

I was importing from a file into my local elasticsearch cluster, I noticed Percentage progress was incorrect, leading to an "Infinity" for the percentage completed.

I traced this back to the getLineCount function, where the 'readable' event wasn't firing. Refactored the code
to use 'data' callback instead, and improved error handling.