Fix term printing in errors to properly show embedded lists

The ~w formatting used before was not printing lists embedded in other
terms. This change uses trunc_io to print those terms safely and without
potentially introducing linebreaks (like ~p would)
3 files changed