Update controller.php

Clears temp file prior to update.
Redirects to update page if the package already exists.
remove /index.php/ fro redirect path

Including /index.php/ in the redirect path confuses c5 and sometimes ends up with it being included in the path twice. Taking it out of the path appears to be more reliable.
Merge pull request #2 from JohntheFish/patch-2

It looks that redirect() works as you say. Merged. Thank you.