Extract function, add timeout

If I don’t have my environment set up correctly, I’d like fast feedback
on that.
Merge pull request #10 from alphagov/faster-failures

Extract function, add timeout