Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 11010)
+++ wp-includes/functions.php	(working copy)
@@ -1849,6 +1849,7 @@
 function wp_mkdir_p( $target ) {
 	// from php.net/mkdir user contributed notes
 	$target = str_replace( '//', '/', $target );
+	$target = untrailingslashit($target);
 	if ( file_exists( $target ) )
 		return @is_dir( $target );
 
