support for unicode dirname or filename

support for unicode dirname or filename