Write tmux_attach_or_new function.