Fix a bash bug

In setup.sh, I used '-s' option for 'basename' command, but some
systems seem not recognize such option, so I replace it with a
more portable one.