Update example/* scripts to use the new package interface.
Bump NPM version to 0.5.1 in preparation for publishing.