* Use 'readlink' to figure out the correct path instead of 'cd ... ; pwd' etc.
* Missed a few 'egrep' => 'grep -E' replacements.