OK, mystery is resolved. This was not an inkscape problem. Paths were being processed by another program apparently and it was putting pipes in the generated string.