When importing from a file into an elasticsearch cluster, I noticed the
percentage progress was incorrect. 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.
Merge pull request #36 from pcsanwald/master

Fix getLineCount for correct progress reporting.