Fetch support.

This supersedes #203.

It looks mostly ready so I'm open to suggestions. It misses tests (again :-S) and documentation.
This is only used within one test. Would it make more sense to just be inline there?