Call to undefined method Piwik_Config::getInstance() during Auto-Archiving

I have been trying to set up an Crontab to archive data in piwik as our site has become extreemly slow recently. I was referring to the following, link using the Linux/Unix section.

http://piwik.org/setup-auto-archiving/#toc-linuxunix-how-to-set-up-a-crontab-to-automatically-archive-the-reports

But when ever i try to test the cron command manually

/usr/bin/php5 /path/to/piwik/misc/cron/archive.php – url=http://example.org/piwik

I get this error

Call to undefined method Piwik_Config::getInstance() in /ip/oracms/wwws/piwik/misc/cron/archive.php on line 778

Dont know what should be the issue. I tried different versions of archive.php that are mentioned in this 301 Moved Permanently post but i am still getting the same error.

Do i need to install some libraries for this to work ? Do i need to add any reference ?

Also i would like to know if setting this job is the only way to speed up piwik ?

please reupload files in core/config.php ?