Fix and test examples

Some examples were outdated, or broken. I updated the examples, added a new example (that was already in the README but was not working), and created a test that runs all examples, to prevent breaking them without noticing it.