We need to wait for write stream finish then callback.

Also add download stream test case.
And add Makefile to easy run unit test by: `$ make test`.
And run code coverage by: `$ make test-cov`.
Merge pull request #22 from fengmk2/wstream-not-finish-fix

We need to wait for write stream finish then callback.