Let $G$ be a finite group with commutator subgroup $G'$. Let $p$ be a prime number. Then $p \nmid |G'|$ if and only if $G$ has an abelian Sylow $p$-subgroup $P$ and normal $p$-complement $N$ (and in this case $G=N \rtimes P$ ).
This is surely a standard result, but I can't seem to find a proof written down anywhere. I have worked out a straightforward proof below, but if someone could provide a good reference to a proof (so that I can just cite it in a paper I'm writing), that would be great.
Proof: Suppose that $G$ has an abelian Sylow $p$-subgroup $P$ with normal complement $N$. Then $P \simeq G/N$ is abelian so $G' \leq N$. But $p \nmid |N|$ so $p \nmid |G'|$. Suppose conversely that $p \nmid |G'|$. Let $P$ be a Sylow $p$-subgroup of $G$ and let $\theta:G \rightarrow G/G'$ be the natural projection. Then $P \cap G'$ is trivial and so $\theta$ restricted to $P$ is an isomorphism. But $G/G'$ is abelian, so $P$ is abelian. Since $G/G'$ is abelian, there exists a subgroup $M$ such that $G/G' = \theta(P) \times M$. Let $\psi:G/G' \rightarrow \theta(P)$ be the natural projection. Then put $N:=\ker(\psi \circ \theta)$.