Modify chardetect to use argparse and work like a normal command.