Bugfix for broken tofile/fromfile and save/load in Mac OS X Issue #2806

I have hacked around a fix for the issue where large matrices were not read from memory correctly (issue #2806). I have been using this branch personally ever since it was created and did not notice any problems with it, therefore I am confident in sending a pull request.

This might need a bit of refactoring to fit the rest of the code cleaner, though.
Please see https://github.com/numpy/numpy/issues/2806 for more discussion on this.