Method savePageSourceToFile tries to close unexpected alert/confirm dialog (if any)