Check extension rather than mimetype

@cahrens works on Firefox ESR with Chris' file.