Added test to check download_file error type (issue pointed out by @kbarbary)
Fix attempt to access errno when the exception sometimes doesn't have it

Closes #808
fixed test failure due to `reason` not always being present on HTTPError objects
Merge pull request #808 from eteq/fix-issue-808

Minor exception handling bug in astropy.utils.data