Fix cts-tradefed script to work on MacOS

readlink does not work the same on linux and MacOs because
MacOs does not have 'realpath'. Use our own 'realpath' func
to ensure we always get the path right.

Test: ./cts-tradefed for different directories on linux and Mac
Bug: 76428311
Change-Id: I93cac42c265dcc381be2c3103dc1b033cbb66377
1 file changed