Updated convert_filename for python3 compatibility.

Fixed another unicode bug.