A Perturbative Model for the Intrinsic Alignments of Galaxies