added test to check for directories