envsetup: Fix remote functions to deal with symlinks

Change-Id: I6f35dc30dda22149b2c37e1c6c7d41ea7239d3bb
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2

Conflicts:
	envsetup.sh