Make text objects compareable over filename.