Check if tok exists before use

The problem is described in #8078 and was introduced in 151759b.

I am not super happy with the solution here. It seems that checks for
required `load` keys are done differently all over master.py. The reason
why I choose to check for `tok` separately was to be able to pinpoint
which minions have not been upgraded to 0.17.1.

Moving forward the checks for `id`, `data`, `tgt`, `fun`, etc could be
logged the same way, if appropriate.
Fix copy-paste error
ReStructure doesn't req * to be escaped in blockquotes.
Provide a default `PATHEXT` environment variable.

Added test case which relies on the `PATHEXT` environment variable.
Merge pull request #8138 from dangarthwaite/tweak_reactor_docs_2

ReStructure doesn't req * to be escaped in blockquotes.
Correctly evaluate the test kwarg when running a state.
Merge pull request #8141 from cachedout/#7788

Correctly evaluate the test kwarg when running a state.
These modules are needed for frozen Windows builds
Merge pull request #8143 from UtahDave/develop

These modules are needed for frozen Windows builds
Merge pull request #8136 from holmboe/keyerror-tok

Check if tok exists before use
Merge pull request #8139 from s0undt3ch/features/mocked-which-test

Provide a default `PATHEXT` environment variable.