Updated convert_filename for python3 compatibility.