Further improvement to the lazy image loader

Should now be a little more intelligent with things in the file cache.