Use something just a *tad* more robust than pwd alone.