Determines if a directory exists