Make sorting thumbnails by date more reliable.

Now copes with files that have no date metadata.