A Test for the Significance of Astronomical Alignments