testprograms: fix fortran indexing bug

fortran indices start at 1, not 0.
testprograms: make sure the smoother actually does something
clean up some comments and error messages.
include replacement malloc in 'mallocs' fqn.

so that we can test on a wide variety of programs.  seems to work.
remove debug prints + clean up some testing code.