New function to save and reload animations

The animations can now be saved to a text file and reloaded from the
same text file. Greatly reduces risk of loosing animations and give
them the ability to be ported to another model or project.