Better handling of unicode prefix_dir on OSX.