GH-23: detect if GEM_HOME is not cleared during build and fail early