Avoid traversing the filesystem so much.