Ok, I can now produce the equations using step 4 in the debug. To get this working I had to generate an additional latex format file and place it into the correct directory.
latex -ini latex.ltx
cp latex.fmt /var/moodledata/temp/latex
The initial step 3 test still doesn't work. I checked permissions and there are no problems that I can find.
However, my site now produces the desired equations so I think I will not worry too much about this.