Change dump() to __str__()

Suggested by Fabien Pichot (@drepdash)