Add avatar.save and unit test for it