Added test for directory check