I'm looking at a Building Agreement as I type. At the start there is the Covenant to Build (Clause 1), then the Completion Period (Clause 2) and then the Method of Payment (Clause3), under which the parties sign. The standard language in Clause 2 is as follows:
"The Contractor shall complete the Works and make same fit for habitation and use (vacating the Site and clearing away all scaffolding, unused materials and rubbish therefrom) within eighteen calendar months from the date hereof."
In General Condition 1 later on it states that the Contractor will complete the works within the time specified in Clause 2 "provided that the completion period shall be extended for a reasonable time if the Contractor is delayed in performing this Agreement by any cause which is not reasonably within his control..."
If you are in a position to invoke Clause 2 then the contract is at an end and your deposit is fully refundable. Obviously the Builder may seek to claim that they were delayed by something outside their control. Getting the deposit refunded could potentially still turn messy in such an instance but the issue would turn into one of whether the delay was reasonable which may be difficult to prove rather than the Purchaser simply facing a Breach of Contract claim.