Redo the SampleList generator helper.

Remove the directory from the SampleList class, since it does not
belong there (SampleList does not care where the samples are).
Replace the sample adding function with a class that will do the
same thing.
Update the examples to reflect this change.