Fixed SCRIPT_DIR computation when CDPATH is set.
Merge pull request #412 from ggtools/master

Fixed SCRIPT_DIR computation when CDPATH is set.