fix and improve dircache tests