Number::getDigit: get the nth digit of a number in a given base.