Also fix unicode error for python2 with file caching