Change to new interface to add terms.
Do not let tests create temporary files.

Among other things, this is terrible when running tests in parallel.
Double bracers for GCC 4.7 compatibility.
Try using GCC 4.7 for continuous integration.