save_population function

Save a population to file