Fix regression where uploading files with non-ASCII names failed.