Base64_convert code: Some off-by-one and buffer cleaning problems
fixed. See #953