Updated cmd_path to ignore extraneous arguments.