fix lookup of filenames containing non-ascii characters