Whenever any will has been proved and recorded for six months in any county of this state, as required by this article, and such will is required to be proved out of this state, the judge of probate may, on the application of the executor, duly sworn to, allow him to withdraw the will.