fetchdata: read the file in chunks and stream them out to disk

This way it doesn't cache the entire file in Python's memory, which can
cause IOErrors and connection resets for very large files.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>