envsetup: Fix remote functions to deal with symlinks

merged CM Commit http://review.cyanogenmod.org/#/c/53961

Change-Id: Idf226d9cb79664af597eeca5f1d005eb6518eff0
Merge pull request #7 from PAC-man/cm-10.2

envsetup: Fix remote functions to deal with symlinks