Index: wp-includes/class-http.php
===================================================================
--- wp-includes/class-http.php	(revision 23178)
+++ wp-includes/class-http.php	(working copy)
@@ -141,7 +141,7 @@
 		// Force some settings if we are streaming to a file and check for existence and perms of destination directory
 		if ( $r['stream'] ) {
 			$r['blocking'] = true;
-			if ( ! is_writable( dirname( $r['filename'] ) ) )
+			if ( ! wp_is_writable( dirname( $r['filename'] ) ) )
 				return new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) );
 		}
 
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 23178)
+++ wp-includes/functions.php	(working copy)
@@ -1401,21 +1401,19 @@
 	if ( $temp )
 		return trailingslashit( rtrim( $temp, '\\' ) );
 
-	$is_win = ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) );
-
 	if ( function_exists('sys_get_temp_dir') ) {
 		$temp = sys_get_temp_dir();
-		if ( @is_dir( $temp ) && ( $is_win ? win_is_writable( $temp ) : @is_writable( $temp ) ) ) {
+		if ( @is_dir( $temp ) && @wp_is_writable( $temp ) ) {
 			return trailingslashit( rtrim( $temp, '\\' ) );
 		}
 	}
 
 	$temp = ini_get('upload_tmp_dir');
-	if ( is_dir( $temp ) && ( $is_win ? win_is_writable( $temp ) : @is_writable( $temp ) ) )
+	if ( is_dir( $temp ) && @wp_is_writable( $temp ) )
 		return trailingslashit( rtrim( $temp, '\\' ) );
 
 	$temp = WP_CONTENT_DIR . '/';
-	if ( is_dir( $temp ) && ( $is_win ? win_is_writable( $temp ) : @is_writable( $temp ) ) )
+	if ( is_dir( $temp ) && @wp_is_writable( $temp ) )
 		return $temp;
 
 	$temp = '/tmp/';
@@ -1423,8 +1421,25 @@
 }
 
 /**
- * Workaround for Windows bug in is_writable() function
+ * Detect if a directory is writable.
  *
+ * This is needed as we need to selectively Workaround a PHP Windows bug in is_writable()
+ *
+ * @since 3.5.1
+ *
+ * @param string $path
+ * @return bool
+ */
+function wp_is_writable( $path ) {
+	if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) )
+		return win_is_writable( $path );
+	else
+		return is_writable( $path );
+}
+
+/**
+ * Workaround for PHP Windows bug in is_writable()
+ *
  * @since 2.8.0
  *
  * @param string $path
