tweaked run.sh to support more automagic on macs

be a bit smarter about the delay guess