Speed up initial repository access

Use os.listdir() instead of os.walk() to avoid unnecessary
stat() calls.

Closes #119