This insures the actual base64 content has a length a multiple of 4. Also added a test case for the failure.