diff --git a/advagg.install b/advagg.install
index d7ef9cc..c8c26c4 100644
--- a/advagg.install
+++ b/advagg.install
@@ -9,6 +9,13 @@
  * Implementation of hook_enable().
  */
 function advagg_enable() {
+  // Create the advagg_css/ path within the files folder.
+  $csspath = file_create_path('advagg_css');
+  file_check_directory($csspath, FILE_CREATE_DIRECTORY);
+  // Create the advagg_js/ path within the files folder.
+  $jspath = file_create_path('advagg_js');
+  file_check_directory($jspath, FILE_CREATE_DIRECTORY);
+
   // Rescan files
   register_shutdown_function('advagg_flush_caches');
 
diff --git a/advagg.module b/advagg.module
index 8104a75..857e17d 100644
--- a/advagg.module
+++ b/advagg.module
@@ -296,6 +296,8 @@ function advagg_get_root_files_dir($reset = FALSE) {
 
   $css_path = $custom_path . '/advagg_css';
   $js_path = $custom_path . '/advagg_js';
+  file_check_directory($css_path, FILE_CREATE_DIRECTORY);
+  file_check_directory($js_path, FILE_CREATE_DIRECTORY);
   return array($css_path, $js_path);
 }
 
