Fix thumbnail path check for directories without images (ref #68).