added creation of data dirs for btree

git-svn-id: https://hyracks.googlecode.com/svn/trunk/hyracks@129 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeOpHelper.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeOpHelper.java
index 1db6bcd..64cec29 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeOpHelper.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeOpHelper.java
@@ -66,10 +66,14 @@
                 
         String ncDataPath = System.getProperty("NodeControllerDataPath");
         String fileName = ncDataPath + opDesc.getBtreeFileName();
-                
+        
         btreeFileId = fileMappingProvider.mapNameToFileId(fileName, createBTree);        
         
-        File f = new File(fileName);        
+        File f = new File(fileName);
+        if(!f.exists()) {
+        	File dir = new File(f.getParent());        	
+        	dir.mkdirs();
+        }
         RandomAccessFile raf = new RandomAccessFile(f, "rw");
         
         if (!f.exists() && !createBTree) {