cStringIO and simply bro script dir logic