Use inspect/1 instead of to_string/1 on errors

It fixes #26