Fix urllib2 error handling
Merge pull request #53 from djosephsen/master

Fix urllib2 error handling