Added src/base/cutils.c and associated tests