macosx: do not depend on w3m

* and some pep8 changes
* use curl on osx and wget otherwise, as w3m
  is not that popular now.
* seems the 'install' from BSD does not like
  "-Dm644", so pass "-m644" instead.