Tenants facing eviction from Ministry of Defence houses near Edinburgh's Dreghorn barracks could be able to stay in their homes long-term.