Fixed bugs specific to Windows.

The Microsoft compiler cannot handle arrays of zero or non-constant
length.

Change-Id: I9ffd5ba7a1195a2eb22ba1da8a2f9b6d409407fd
MBUS-2424: remove executable bit from text files