Fixed SCRIPT_DIR computation when CDPATH is set.