fixed configure problem with solaris which command
fixed getcwd usage for solaris
fixed test.sh on solaris