added constants.php file and implemented constants for file system modes
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index ad54fc3..08394da 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -129,12 +129,12 @@
 	

 		if ( ! @is_dir($dir_path))

 		{

-			if ( ! @mkdir($dir_path, 0777))

+			if ( ! @mkdir($dir_path, DIR_WRITE_MODE))

 			{

 				return FALSE;

 			}

 			

-			@chmod($dir_path, 0777);			

+			@chmod($dir_path, DIR_WRITE_MODE);			

 		}

 		

 		if (write_file($dir_path.$filename, serialize($object)) === FALSE)

@@ -142,7 +142,7 @@
 			return FALSE;

 		}

 		

-		@chmod($dir_path.$filename, 0777);

+		@chmod($dir_path.$filename, DIR_WRITE_MODE);

 		return TRUE;

 	}