GENERALIZED KNOT GROUPS DISTINGUISH THE SQUARE AND GRANNY KNOTS (WITH AN APPENDIX BY DAVID SAVITT)