Fix some bugs in the scripts Makefile
Optimize to_cassandra.py