Improve error handling in the spreadsheet download tool

Fixes https://github.com/scraperwiki/spreadsheet-download-tool/issues/48

**Do not merge yet.**