compare types, not merely file endings; fixes #37