Ensure MVar usage is exception-safe.
Use `throwIO` in preference to `throw`.

Cf. http://hackage.haskell.org/package/base/docs/Control-Exception.html#v:throwIO
Merge pull request #89 from twittner/throwio

Ensure MVar usage is exception-safe and use `throwIO`