Only show authors with posts

$args = array(
    'posts_per_page' => 1,
    'author'         => $author->ID
);
$posts = new WP_Query( $args );
$count = count( $posts );

Put this right after the foreach, $count will now contain either 1 or 0, put it through an if statement to filter the output.