The families of Australian diplomats based in two Middle Eastern countries have been urged to leave as the security situation in the region worsens.