FSM visualisation script: use argparse instead of optionparse and some minor cleanup