Fix examples for 0.3 release

Update the examples directory to work with API changes made during the 0.3 release cycle.

This is most for review- the `pi_distarray` script seems to be broken due to an error with `sum` and boolean arrays.