refs #61, clean up code relating to cachefiles, expand the
cachefiles_list class and move some functionality in there.