You're right.

In looking for a realpath alternative or workaround for OSX I saw mentions of `pwd` not being exactly equivalent as it doesn't handle path collapsing or other things quite the same way. But for this simple test script, the simplest solution is better.