added method for saving mesh groups.

hi @satoruhiga!

ive added a method for saving mesh groups.
have tested and seems to be working well but it would be good for you to have a look over it.

cheers,
L.