Unit tests for purging

These use WebMock to fake HTTP responses.
Unit tests for spidering