improved get_field2 to support array indexing, and improved validate_program_path to use which() and check that the file exists and is executable