Use bash when using $RANDOM bashism

$RANDOM is only supported by bash, not by sh.