Fix GeometryCollection writing issue. Add a test for GeometryCollection.

Fixes issue #2. Add test for GeometryCollection.