Fix buggy __dir__ methods