Save tests

Changed the way the save function works so that we can actually have tests for it. Also added some stuff to the git ignore so it ignores git files created during a merge.