resolve py2.6 unittest str(err) and TypeError

for py>2.6: can't use a string pattern on a bytes-like object
Merge branch 'issue-44-solaris-support' of github.com:pexpect/pexpect into issue-44-solaris-support