Added test for not a directory