Update controller.php

Clears temp file prior to update.
Redirects to update page if the package already exists.