Adapt method to deal with Non-ASCII filenames.