Fix up patch wkb output,
add tests.