Preparation and characterization of graphite foams