OK, so the 404 error was resolved by placing the line
add name="DnnImageHandler" path="DnnImageHandler.ashx" verb="*" type="DotNetNuke.Services.GeneratedImage.DnnImageHandler, DotNetNuke" preCondition="integratedMode" /
in the correct section.
I now get an Error 500. The image being called for is /DesktopModules/~/Icons/Sigma/Users_32x32_Standard.png
However the Icon files were not at that location but at /Icons/Sigma
I copied them to the exxpected location but that is when I get the 500 error.