allow to customize go flags; fix usage of stringio instead of tmpfile