Negative-ion formation from surface scattering at finite temperatures