properly handle unicode paths