Linux Support: Make expand path even safer.