When I've put binding on by machine, I turn the folded edge to the back and pin in the ditch from the front. I pin very close together, making sure there is a little room on the back beyond the pin for the needle to catch. Then I stitch in the ditch on the front, removing pins as I get to them. I use my walking foot so it feeds more evenly through the machine. So far, if I go pretty slowly and don't remove the pins too soon, I've had good success with the binding being caught on the other side.