Getting the filename for git doesn't rely on the arbitrary sorting of listdir anymore. Now it makes sure it's definitely using the highest number in the directory when it saves.