clean up GitRepo.ls() a bit
fix bug in GitRepo.ls() when path ends with / and directory=False

non-directories were being ignored
fix issue #19, fix HgRepo.log() with directory=True on non-root paths