Convert IO errors into erros in the Idris monad

Introduces a variant of liftIO, called runIO, that converts IO errors into
Idris errors with the Msg constructor.

Fixes #543.