AppendCheckDigit function

Append a check digit to a value