If there is a file in the check-out that is changed into a directory,
then when fossil goes to commit the changes, fossil will not realize that
the file has been changed into a directory and the commit will not work.

It is not clear what the correct behavior here should be.  Perhaps there
should simply be an error message explaining what has gone wrong.  Or
perhaps files that have become directories should be dropped from the
check-out, either with or without a warning.