Check if directory exists