         return paths.first as String
     }
     
-    public class func translateAbsoluteToRelative(path :String) -> String {
-        if path.hasPrefix(self.homeDirectoryPath()) {
-            return path.stringByReplacingOccurrencesOfString(self.homeDirectoryPath(), withString: "", options: nil, range: nil)
-        } else {
-            return path
-        }
-    }
-    
-    public class func translateRelativeToAbsolute(path :String) -> String{
-        if path.hasPrefix(self.homeDirectoryPath()) {
-            return path
-        } else {
-            return self.homeDirectoryPath() + path
+    public class func translateAbsoluteToRelative(path :String?) -> String? {
+        if let path = path {
+            if path.hasPrefix(self.homeDirectoryPath()) {
+                return path.stringByReplacingOccurrencesOfString(self.homeDirectoryPath(), withString: "", options: nil, range: nil)
+            } else {
+                return path
+            }
+        } else {
+            return nil
+        }
+    }
+    
+    public class func translateRelativeToAbsolute(path :String?) -> String? {
+        if let path = path {
+            if path.hasPrefix(self.homeDirectoryPath()) {
+                return path
+            } else {
+                return self.homeDirectoryPath() + path
+            }
+        } else {
+            return nil
         }
     }
 }

    
    public class func fileExistsAtPath(#relativePath: String?) -> Bool {
        if let path = relativePath {
            let absolutePath = Warehouse.translateRelativeToAbsolute(path)
            return NSFileManager.defaultManager().fileExistsAtPath(absolutePath)
        } else {
            return false
        }

    }
    
    public class func openFile(#relativePath: String?) -> NSData? {
        
        if let path = relativePath {
            if let absolutePath = Warehouse.translateRelativeToAbsolute(path) {
                let data = NSData(contentsOfFile: absolutePath)
                return data
            } else {
                return nil
            }
        } else {
            return nil
        }
