This is all wrong - copied from one of the functions above, I think.  This is /var/cfengine/, or something equivalent, not /usr/bin/cf-upgrade !