CD upgraded
To enable it, add the following lines to the end of your ~/.bashrc file, replacing /path/to/smcd.py with the actual path to where you saved the file:
cf() {
python /path/to/smcd.py
if [ -f /tmp/smcd_path ]; then
cd "$(cat /tmp/smcd_path)"
fi
}