Fix bad argument parsing in attach script