check if a directory exists and create it if necessary,"if (not os.path.exists(directory)):