Common utility functions that were defined in base.py are moved to their own Utils class. Additionally this patch adds some checks to ensure keys exist in setup() before attempting to access them. Change-Id: Ib940eefce140e3552f41ff0e32123ae90fe81fe4