macosx: replace all readlink cmds with readlnk alias
macosx: rework do_test
prefix all global vars with '_'