Bash Function to Return the Absolute Path of a Directory Name Passed as an Argument

For some reason, a portable solution (i.e., something that works on most common flavors of POSIX systems, from the Linux variety to the Unix ones) to this is a little tricky. Here is one that seems to do the job: