Implement a primitive command-line argument parser

This at least lets me move around messages within the current folder,
but it's going to have to get ripped out becuase right now it's pretty
hairy.