Added a check to see if folders already existed before making new directories.