envsetup: Fix remote functions to deal with symlinks

Conflicts:
	envsetup.sh

Change-Id: I6f35dc30dda22149b2c37e1c6c7d41ea7239d3bb