Adding tests for cache and using shelve to implement simple download cache.