Support custom finalisation scripts in restore.php