Add support for saving registered stub mappings

Hi,

This change addresses the request in issue #59 - i.e. it adds support for saving the current stubs to the mappings directory.

The code seems to favour integration tests over unit tests, so I've tried to do what I thought was in keeping with the current codebase - let me know if you'd like to see more / different tests (or indeed any other changes to the patch) and I'll be happy to oblige.

Thanks,
Rowan