Add support for command line parameters

This makes it possible to enable debugging and other features at runtime
rather than at compile-time.