Teen tried to escape from Malmsbury Youth Justice Centre, court told