Added __str__ and tests.

There's a problem in one of the other __str__ functions. This currently
passes its test, but the hardcoded results aren't what I would have
intended.