Test (and fix) the git_submodule_sync changes

I wrote this stuff a while ago and forgot to write tests.  Wanted
to do so now to wrap up the PR and immediately found problems.