Deal with possible errors in __tostring metamethods.

When printing values that has a __tostring metamethod, take into
account that calling may fail.

fixes #4