Make sure all paths are handled in UTF8 instead of unicode

Ticket:	#4481
(cherry picked from commit 30ee41336d7e1d3ac49f21d6843469b40490a9ea)