fix-test-diffmat-2

Some fixes to `diffmat` and its test, which was failing on my machine due to a tolerance issue and on @Hadrien-Montanelli's machine due to a minor oversight in the new code which ensures that the differentiation matrices have the desired symmetry properties.  See also the defunct pull-request #1169, which this one replaces.