changed image loading and thumbnail writing to use the new imagefactory and our vfs.