$cleanupTargetDir not correctly implemented in upload.php.