Added caching of downloaded files.

Please let me know if you see any issues.