Thinking about buying a foreclosure? If you do everything right—and have some luck–it could be a great deal. Here's how to buy a foreclosed home.