For places where we are not bare, we should also assert (after the isBare() assert) that getDirectory() and getWorkDir() match what we expect as return values.  Especially since we are asking the Repository class to do some guessing based on what we gave it.