work on getting arrays right with SWIG.

Also added detection for OS/CPU