Open files in shared mode on windows, so that other tools may read them.

This was the behavior before fopen_s() was used for implementation; unlike fopen(), fopen_s() opens the file in exclusive mode.
Fixed a buffer overflow in cChunk:SetLight().

There are only half as many bytes for light than there are blocktypes.