Hopefully, you will be able to work this out thru the agent who represents you. You may need to get the advice of a real estate attorney if it can't be worked out. But,, many times the this can be worked out by getting the bank to absorb the fees or the seller, but we are seeing increasingly that the banks Don't want to absorb these fees and may even allow the home to go to foreclosure than do the short sale.
This is not in any way legal advise. HOA debt is very common. Usually the seller or the bank pays this. You can refuse to close escrow and ask for this to be paid for by the bank or seller. Short sales only have 39% over all closing rate because of these factors that pop up. This should be the sellers cost not yours.
As previously stated, walking away may get your ernest money deposit back, depending on the contract language, but the inspection fees will likely be absorbed by you.
Hardly seems they are playing fair, does it!