Replace u() function with out_u for safer unicode conversion
Convert shortened path to unicode

Fixes #1064
Merge pull request #1065 from ZyX-I/fix-1064

Fix some possible unicode errors