It is really very difficult to do what you are attempting without running into multiple errors. For one thing, integrating the sun, which will cover only a few pixels in an image, is problematic. Also, you can neither add together R+G+B nor use the luminance factor 179 (built into your 47, 117, 15 scalars) in your conversion. That said, the following should work for the sky component (-i option):
The final multiplier of 4 is perhaps difficult to understand. Because the image covers a square area, whereas you only want the circle in the center, you need to multiply the average by 4/pi. However, you also need to multiply the averaged result by pi to get irradiance (rather than averaged radiance). Hence, you need to multiply by pi*4/pi, which is just 4. Using this, I get back a value of 56.736 (rather than 57.0), showing the normalization is not perfect.
If I try to compute the output of the sun only, I can do this by leaving off the sky description and going to a much higher resolution image:
The above yields a result of 444.1, which is a higher relative error than the sky calculation most likely due to the difficult of integrating such a small source using a full hemispherical image.