tested
A near total rewrite triggered by finding a opkg repository I can use
for emacs and svn.  Gratuitous refactoring, so it' pretty; but now
it's untested.