dirname fix according from_utf8 return option now
fix wc due from_utf8 changes and resolve warnings