Isn't $(dirname $0) more portable than this?