Implement known_command; make gtp_is_valid() stricter