patch for FELIX-1394

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@796366 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java b/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java
index ad626b7..06654ae 100644
--- a/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java
+++ b/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java
@@ -68,7 +68,11 @@
 				URLConnection c = getObrURL().openConnection();
 				c.connect();
 				in = c.getInputStream();
-				out = new FileOutputStream(getObrlCache());
+				File file = getObrlCache();
+				if ( !file.getParentFile().mkdirs() ) {
+					throw new IOException( "Failed to create obr cache" );
+				}
+				out = new FileOutputStream(file);
 				stream(in, out);
 			} catch (IOException e) {
 				// TODO Auto-generated catch block