Added check to see if a thumbnail is still up to date.

When the thumbnail image already exists on disk, but the modification date of
the thumbnail is not later than the modification date of the original image,
the thumbnail is regenerated.