Added util.{c,h} with common functions

Signed-off-by: Bogdan PURCĂREAŢĂ <bogdan.purcareata@cti.pub.ro>