check that it is an actual directory