envsetup: fix out dir detection

The standard Mac OS X readlink binary does not support the --f
argument, so change this to something more safe and bullet proof.