bugfix: utf8 filename makes File.xx API behave strangely.