Update validate script to raise sensbible error if flex not installed.