build.sh: Cleaned up $scriptdir handling