UTF-8 diacritics in filenames

This patch fixes problems I had with UTF8 diacritics in uploaded files filenames.