Add groupid & flags to image information lib

This is mostly for debugging purposes, so we migth #ifdef it out when
building from a source package and only leave it in when compiling from
git.