Fix permissions and change python to python2.7

Prepare for the time when "python" is python3.
tests: Use python unittest.main