If I understand you, he hook you want (WordPress 3.5.1) is load-upload.php
.
Proof of concept:
function t_wpse_94284() {
wp_redirect(home_url());
exit;
}
add_action('load-upload.php','t_wpse_94284');
That hook should fire only on /wp-admin/upload.php
and, though I haven't tested it, I think that your function should work just fine as it is.