Peru's ousted president asks court for his freedom