export and quote PATH, fix #2765