Clean up indentation and remove commented-out code

This is preparatory to replacing the http client code.

Note that this changes the script's behaviour so that it no
longer shells out to the 'php' command: instead, we use a
client which doesn't need allow_url_fopen to be set to true
in the first place.