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.