fix callback not called when no data received

this fixes an issue where the callbacks were never called when no data is received e.g. during an empty directory listing.
Merge pull request #5 from adamjimenez/patch-5

fix callback not called when no data received