Implemented repo downloads using streams

This implements feature request #93 using the requirements stated in #94

We can't use this library because it's licensed under the GPL, which in turn would require for klaus to be licensed under the terms of the GPL (which I don't like).