Yes, its very broken. The comment on the cr_mime_types table says, "file_extension is not used to recognize MIME types, but to associate a file extension to the file after its MIME type is specified." Of course, file-storage ignores this, and tries to use file extensions to recognize MIME types. This fails because many file extensions can map to a single MIME type, violating the primary key constraint on mime_type when file-storage tries to add new rows. I.e. "jpg" is already in the table, so uploading a file with extension "jpeg" or "JPG" will fail. It looks like the download package might also include this faulty code.
I'm not sure what the correct solution is. Could you add "*/*" as a MIME type in the cr_mime_types table, and change fs_maybe_create_new_mime_type to just be return [ns_guesstype $file_name]
?