Fix test for directory