Make extract listen for errors and pass them to callback

I think this fixes mozilla/openbadges#877