RF: refactor matlab endian fixes

Fix endian check for writing arrays.
Simplfy code from fix for unicode endianness on read.
Add tests.
TST: replace assertGreater/Less by assertTrue in basinhopping unittests

assertGreater/Less methods (of TestCase) come from unittests2 which is only
available in python2.7 by default. basinhopping tests fail otherwise on 2.6.
Merge pull request #487 from matthew-brett/refactor-mio-fixes

RF: refactor matlab endian fixes
Revert "MAINT: remove setup*egg*.py -- always use setuptools, if present"

This reverts commit 3d06e4a7a39bf84efbd8f2203a1f92204662e534.

Setuptools sets mode +x on the test scripts, so that Nose refuses to run
them. Better not do that.