Fix issue with Sage 5.6: SAGE_TMP is a Lazy String, so needs converting to unicode.