Added test and code to check for invalid base58 characters before decode.
Referenced where I got some of the unit tests from.