added is_really_writable() to Common.php, replaced is_writable() throughout application with is_really_writable()
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php
index b6f0a46..d9ddf80 100644
--- a/system/codeigniter/Common.php
+++ b/system/codeigniter/Common.php
@@ -30,6 +30,44 @@
 // ------------------------------------------------------------------------

 

 /**

+ * Tests for file writability

+ *

+ * is_writable() returns TRUE on Windows servers

+ * when you really can't write to the file

+ * as the OS reports to PHP as FALSE only if the

+ * read-only attribute is marked.  Ugh?

+ *

+ * @access	private

+ * @return	void

+ */	

+function is_really_writable($file)

+{

+	if (is_dir($file))

+	{

+		$file = rtrim($file, '/').'/'.md5(rand(1,100));

+		

+		if (($fp = @fopen($file, 'ab')) === FALSE)

+		{

+			return FALSE;

+		}

+		

+		fclose($fp);

+		@chmod($file, 0777);

+		@unlink($file);

+		return TRUE;

+	}

+	elseif (($fp = @fopen($file, 'ab')) === FALSE)

+	{

+		return FALSE;

+	}

+

+	fclose($fp);

+	return TRUE;

+}

+

+// ------------------------------------------------------------------------

+

+/**

 * Class registry

 *

 * This function acts as a singleton.  If the requested class does not

diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index 44b8e81..ad54fc3 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -63,9 +63,6 @@
 	

 		// Add a trailing slash to the path if needed

 		$path = preg_replace("/(.+?)\/*$/", "\\1/",  $path);

-		

-		// Load the file helper

-		$this->CI->load->helper('file');

 

 		if ( ! is_dir($path) OR ! is_really_writable($path))

 		{

diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 5fb31cf..868561b 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -178,39 +178,4 @@
 

 // --------------------------------------------------------------------

 

-/**

- * Tests for file writability

- *

- * is_writable() returns TRUE on Windows servers

- * when you really can't write to the file

- * as the OS reports to PHP as FALSE only if the

- * read-only attribute is marked.  Ugh?

- *

- * @access	private

- * @return	void

- */	

-function is_really_writable($file)

-{

-	if (is_dir($file))

-	{

-		$file = rtrim($file, '/').'/'.md5(rand(1,100));

-		

-		if (($fp = @fopen($file, 'ab')) === FALSE)

-		{

-			return FALSE;

-		}

-		

-		fclose($fp);

-		@chmod($file, 0777);

-		@unlink($file);

-		return TRUE;

-	}

-	elseif (($fp = @fopen($file, 'ab')) === FALSE)

-	{

-		return FALSE;

-	}

-

-	fclose($fp);

-	return TRUE;

-}

 ?>
\ No newline at end of file
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 011bdbf..f9ca85a 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -46,7 +46,7 @@
 		

 		$this->log_path = ($config['log_path'] != '') ? $config['log_path'] : BASEPATH.'logs/';

 		

-		if ( ! is_dir($this->log_path) OR ! is_writable($this->log_path))

+		if ( ! is_dir($this->log_path) OR ! is_really_writable($this->log_path))

 		{

 			$this->_enabled = FALSE;

 		}

diff --git a/system/libraries/Output.php b/system/libraries/Output.php
index f98dab5..a4d8d34 100644
--- a/system/libraries/Output.php
+++ b/system/libraries/Output.php
@@ -285,7 +285,7 @@
 	

 		$cache_path = ($path == '') ? BASEPATH.'cache/' : $path;

 		

-		if ( ! is_dir($cache_path) OR ! is_writable($cache_path))

+		if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))

 		{

 			return;

 		}

@@ -327,7 +327,7 @@
 	

 		$cache_path = ($CFG->item('cache_path') == '') ? BASEPATH.'cache/' : $CFG->item('cache_path');

 			

-		if ( ! is_dir($cache_path) OR ! is_writable($cache_path))

+		if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))

 		{

 			return FALSE;

 		}

diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 39f1ed5..dd70122 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -641,7 +641,7 @@
 			return FALSE;

 		}

 

-		if ( ! is_writable($this->upload_path))

+		if ( ! is_really_writable($this->upload_path))

 		{

 			$this->set_error('upload_not_writable');

 			return FALSE;

diff --git a/system/plugins/captcha_pi.php b/system/plugins/captcha_pi.php
index 11d4564..693fd91 100644
--- a/system/plugins/captcha_pi.php
+++ b/system/plugins/captcha_pi.php
@@ -180,7 +180,7 @@
 		return FALSE;

 	}

 	

-	if ( ! is_writable($img_path))

+	if ( ! is_really_writable($img_path))

 	{

 		return FALSE;

 	}