Make tostr output valid yaml again. This meant no tabs in output. Also get rid of trailing comma on flags.