Added waitForCompletion() method to block until download is complete

Closes #38.

Signed-off-by: Maxime Petazzoni <mpetazzoni@turn.com>