A court has cleared the proposed management buy-out of UK snack maker Lees Foods.