upgrade cdb_cache scripts to work with python 3.x

The new codac2 server (temporary name: codac2new) uses python 3.x. The old server was using scripts in /root/bin to manage data in CDB cache, which no longer works with pzthon 3.x. The scripts need to be upgraded.