Fixes issue #37

This fixes issue #37 by truncating the cache file to the content offset returned by the server, and then creating a new output stream instance.