I think this anwers the question for infinite groups:
MR0470091 (57 #9858) Collins, Donald J. The automorphism towers of some one-relator groups. Proc. London Math. Soc. (3) 36 (1978), no. 3, 480--493. 20F55
Theorem (ii) states that if $G=\langle a,b \mid a^{-1}b^ra=b^s \rangle$ is a Baumslag-Solitar group with $r-s$ even, then $Aut(Aut(G))$ is isomorphic to $G$ and $G$ has an outer automorphism.
Moreover, when $r=1$, $G$ is the semidirect product $\mathbf Z \ltimes \mathbf Z[\frac 1 s]$, where $\mathbf Z$ acts via multiplication by $\frac 1 s$. Then $G$ is torsionfree, but $Aut(G)$ has an element of order 2 (see his lemma 3). If $G$ is represented as a matrix group, $(a,b) \mapsto \begin{pmatrix} s^a & b \\
0 & 1 \end{pmatrix}$, then this outer automorphis automorphism is explicitely given by conjugation by $diag(i,-i)$, where $i$ is a square root of -1.

