Two teenage brothers who faced being deported to Pakistan have been granted leave to remain in Scotland for another two-and-half years.