More information would be helpful, but a curable defect in title is not ordinarily a valid basis for a buyer to repudiate a contract for the purchase of real property. I am assuming, based on what you wrote, that the contract was fully executed and that the buyer's actions constitute an anticipatory repudiation of the contract. The specific language governing the deposit would be controlling in this instance, although I suspect that there may be some disagreement between you and the buyer as to the factual circumstances at hand. Most houses that are for sale do not have clear title during the executory period of the contract because they are subject to existing mortgages that will be paid off at closing. Further, it seems as though the buyer asked for and received assurances that the title would be good and marketable at closing.
Interpleading is when a third party (like an escrow agent) is in possession of property that it believes will have claim made upon it by more than one party. The escrow agent can essentially place the disputed money with the court and institute an interpleader action which will place you and the buyer adverse to one another and where the winner receives the property back from the court, thus eliminating the escrow agent's risk of giving the property to the wrong person.
Any answer(s), and/or comment(s) provided are not legal advice, should not be relied on in lieu of consulting with an attorney, nor are they intended to create an attorney-client relationship. Those readers and / or posters who believe that they may have legal claim(s) should seek the advice of an attorney who is licensed to practice in the relevant jurisdiction.