I had a long detailed explanation of exactly what goes wrong but I lost it when my computer crashed, so to summarise, the same problem occurs on 3.0.5 to 3.2 Downloads and extracts ok, then update.php fails due to missing ioncube files.
wget ioncube to shell manually and ran update.php from shell, then error for the shell_exec, enabled it in global php.ini and updated from the shell ok, once upgraded to 3.2 was able to change global php.ini back.