Fix sendmany optarg parsing and add tests.