Increase test coverage of test_base64utils.py

This change pulls common code into a private method and increases test
coverage to 100% for test_base64utils.py.

Change-Id: I97aac1eccb92ae35e7997a95ba46e833b0d58be6
Merge "Increase test coverage of test_base64utils.py"