BUG: fix unicode -> str cast in tslib

This should use format since calling str on a unicode string is a *bad* idea
because it may or may not repr correctly.
Merge pull request #3900 from cpcloud/tslib-fix

BUG: fix unicode -> str cast in tslib