Fixed bug in getDir method.

getDir could take two arguments: offset and nodir. If the offset was zero, it would return nodir. However, nodir was sometimes undefined as it was not provided. I added a check to make sure if nodir was undefined, it would be set to Dir_None before calculating the direction.
Converted to strict mode.
Fixed bug related to box size change in strict mode logic.
Merge branch 'autorouter_port'