tests add tests for dir flag