Better writemime for color arrays and matrices. Fixes #14, fixes #35