Issue: #4 Marks changes with some minor refactoring to seperate out test cases

Hello Charles, 

I hope this is the right thing to do.  Here is a fix for the issue #4 - where multiple calls to close can result in the 'coordinates' attribute becoming very long.  A developer here at the Met Office made these changes - he's called Mark Hackett.  I'm acting as proxy to get the changes in, I hope that's OK.

Mark has tried to keep the changes quite small and isolated.

Let me know what you think,
Jamie