GIO has this facility, so we should use it. At the same time, make sure the immodules directory exists, even if we don't install any modules there outselves.