bintree.py: fix str() calls for Python 2 (532784)

Avoid a UnicodeDecodeError raised when str(e) converts an exception
to bytes with Python 2. Since this file has unicode_literals enabled,
use literal unicode format strings to format messages for unicode
exceptions. However, with Python 2, an EnvironmentError exception
may contain either bytes or unicode, so use _unicode(errors="replace")
to ensure safety for EnvironmentError with all locales.

Also, convert remaining str() calls to use _unicode() for uniform
behavior regardless of python version.

X-Gentoo-Bug: 532784
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=532784
Acked-by: Brian Dolbec <dolsen@gentoo.org>