Tests for Imagepalette.save()

Includes #717
* Test passes with #717
* Test fails on previous master