Use realpath to follow symlinks

I ran into this issue when installing android via
homebrew which symlinks android from /usr/local/bin
to /usr/local/Cellar/android-sdk/bin