Handle multibyte filenames properly.