As for getting the outstanding permits inspected and completed: I have nothing new to add and I concur with the previous professionals that outstanding permits have to be completed by the owner or the contractor the owner hired to do the work. Sometimes this is merely administrative (no one added it to the computer database, it was overlooked, etc), and sometimes the final inspection still has to occur.
As a former project manager I can tell you from experience that the final may have hapened but wasn't put in the computer or the general didin't call for it. If you were my clients I would advise that you ask for documentation that the final inspections was done prior to the close of escrow. If the seller can't provide the docs then ask for a sum to be left in escrow. To determine the amount call the building department and ask them what the procedure is and how much it will cost. SF DBI is really getting very good at customer service under its new administration. They will answer your questions and then you will know what has to happen. Again as your agent I would also tell you the seller might not give you what you ask for and then you will have to decide what you will do but it really doesn't hurt to ask.
It is not difficult to get the final signed-off if the job if the construction is up to snuff. Many times the general will drop the last detail because they are onto the next job. Ask your contractors inspector for his opinion of the quality of the work and you'll have a better idea of the ease of getting a sign-off from DBI.