Fix bug marking submodule diffs as unmodified

There was a bug where submodules whose HEAD had not been moved
were being marked as having an UNMODIFIED delta record instead
of being left MODIFIED.  This fixes that and fixes the tests to
notice if a submodule has been incorrectly marked as UNMODIFIED.