reversing the connections in the plug can only make a difference if
a) the plug is wired badly (near short or near open circuit) and/or
b) there is more than one earth return connection somewhere else in the arrangement. If the lamp housing in plastic and you don't have a rear light attached (which might have a ground return connection in it, some still do), then it cannot possibly matter which way round the wires are connected to the plug.
In principle you are correct to be worried about ground return connections; not all shimano hub generators have a ground return but DH-3D37 does;
Models with no ground connection have a connector with a bigger offset to one side and no obvious ground connection (metal part extending from one connection to the locknut)
FWIW it is always a good idea to bench-test the setup before starting to install it on the bike, make brackets, extend wiring etc.
NB one of the faults I have heard of (but not seen myself) in relation to DH-3D37 is that the output windings can go open circuit (or at least high resistance). If you test the current output and it doesn't make at least 700mA into a dead short there may be a fault of this kind.
cheers