Stopped trying to read and write the same stream

`downloadCache()` was attempting to read and write the same file simultaneously, and truncating it as a result.

Closes #24.