Check if the directory exists