Waits for files to be downloaded. Fixes #28

Just added a line that waited for the reply to be completed (in this case the whole file to be downloaded) before creating the HTTPResource. 

The problem was that when you tried to used the HTTPResource the content was only partial.