test for dir