Manually resolve symlinks in test helpers

Mac OS X's `readlink` command does not support the same options as GNU,
FreeBSD, and other operating systems, nor does it support canonicalizing
symlink resolutions.

In place of `readlink`, we're going to borrow [this] suggested implementation
from the community.

[this]: 
http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
`echo` has portability concerns when printing variables. I recommend:

```sh
printf "%s/%s\n" "$current_directory" "$actual_basename"
```