core,w32: Improve handling of Unicode paths