Properly destruct the TGeoManger
If the ROOT session is closed after the macro there is a problem with the destruction of the TGeoManger. Destruct the TGeoManager properly by calling the macro RemoveGeoManager. Add the call in macros where it was missing.