When inserting attachments into a blog post, how can I get WordPress to use the full filename with the extension?

I figured out how to retitle the attachment myself, using a combination of the answers from these two posts:

How can I add a default description to uploaded files?

Change attachment filename

Here’s the code, it’s working on my current WP installation (v4.3)

function wpse_retitle_attachment( $post_ID )
{
    $file = get_attached_file($post_ID);
    $path = pathinfo($file);
    $args = array( 
                    'ID'           => $post_ID, 
                    'post_title'   => $path['filename'] . "." . $path['extension'], 
                    // 'post_excerpt' => 'My default caption ...', 
                    // 'post_content' => 'My default description ...', 
            );

    wp_update_post( $args );

}
add_action( 'add_attachment', 'wpse_retitle_attachment' );