Added ability to skip header and footer bytes, as well as collect only a given number of samples. Also added some protection from bogus arguments.