Unit tests

Ressurect the unit tests originally created by @willmot 

I did this in response to the bug #124 - so probably best to merge that first.

You can run the tests in a very similar way to the backupwordpress tests - see https://github.com/humanmade/backupwordpress-dev for detailed instructions.

In writing these - I had trouble with the group fields - they're a little crazy. I refactored them and have a PR ready for this. The question however is - should this PR include tests that pass, despite some unexpected (but functional) expected results - or should I commit tests that fail.

@joehoyle would love to get your thoughts on this.