Correct the behavior of core.GitMode.Reader and add tests