Use ARGV instead of gets in in examples

Now the examples take command line arguments instead of STDIN. There is a usage comment in each example file.

Fixes #9.