Initial port to argparse

Fixes bug #115.

This needs a lot of testing; I tried to maintain compatibility with the current command set, but there may be slight breakage. I tested the namespace inclusion/exclusion commands among others.