fixed abspath() when called via 'misc/build.sh'

Using bash, ./misc/build.sh worked while misc/build.sh produced a broken 2-line
return value from abspath() for $self.