Restrict authors to seeing ONLY their media files

Not tested, but maybe you can just extend the $pagenow check?

Instead of …

if( 'upload.php' != $pagenow )

… try …

if( ! in_array( $pagenow, array ( 'upload.php', 'post-new.php', 'post.php' ) ) )

That should cover the post editor screens too.