Move stream_handler into command module and have it called from
getMethods and postMethods. More robust handling of Solaris's "couldn't
set locale correctly" errors.