parse_arg(): really test that argument is properly terminated