Added garbage collection in GEM2KML sub to fix out of memory issues