fix method list() doesnt work with filenames with diacritics