Fix make_register_diagnostics script for out-of-tree builds.

Now needs <srcdir> as argument, so that it knows where to scan for XXX_register_diagnostics subroutines. This should fix shallow water and burgers tests for out-of-tree.