Fixed <file> downloads

We forgot to seek to the beginning of the stream before reading it, so the
target file always ended up empty. Unfortunately, the unit-test only checked
that the file existed.