Better separate concerns so that validate can do more.

Starting to move validate beyond just the basics.  This will allow it to
execute the script multiple times in order to check for different
conditions.

There's still no way to modify the environment (constants, argv, stdin,
filesystem, etc), but this will improve that situation.