Port to python3, large code cleanup
* Fixed command line for cosmotool
* Fix path
* Dump command line is log file
* Fix important typo
* Modify paths for example
* Fix path again
* Use an explicit constructor
* Change file to open (python 2->3)
* python3 fix for xrange in periodic_kdtree.py
* Fixed index for Np, numPart, numZones, numZonesTot, partID, zoneID in catalogUtil.py