bad hack: use async file transfer.
fix async-handling for stream ends
Merge pull request #4 from tbaum/master

fix file-download ending too early