         else {
             self.path = path
         }
-        if !self.path.hasPrefix("/") {
-            self.path = "/" + self.path
-        }
-        
+        // If we received a path with a tlde (~) in the front, expand it.
+        self.path = self.path.bridge().stringByExpandingTildeInPath
+
         if let options = options {
             for option in options {
                 switch option {

                filePath += "/" + url
            }
        }
        
        filePath = "." + filePath
        
        if filePath.hasSuffix("/") {
            if serveIndexForDir {
                filePath += "index.html"

                }
            }
        }

        next()

    }

    private func serveFile(filePath: String, fileManager: NSFileManager, response: RouterResponse) {
        // Check that no-one is using ..'s in the path to poke around the filesystem
        let tempAbsoluteBasePath = NSURL(fileURLWithPath: path).absoluteString
        let tempAbsoluteFilePath = NSURL(fileURLWithPath: filePath).absoluteString
        #if os(Linux)
        let absoluteBasePath = tempAbsoluteBasePath!
        let absoluteFilePath = tempAbsoluteFilePath!
        #else
        let absoluteBasePath = tempAbsoluteBasePath
        let absoluteFilePath = tempAbsoluteFilePath
        #endif

        if  absoluteFilePath.hasPrefix(absoluteBasePath)  {
            do {
                let attributes = try fileManager.attributesOfItemAtPath(filePath)
                response.setHeader("Cache-Control", value: "max-age=\(maxAgeCacheControlHeader)")
                if addLastModifiedHeader {
                    if let date = attributes[NSFileModificationDate] as? NSDate {
                        response.setHeader("Last-Modified", value: SpiUtils.httpDate(date))
                    }
                }
                if generateETag {
                    if let date = attributes[NSFileModificationDate] as? NSDate,
                        let size = attributes[NSFileSize] as? Int {
                            let sizeHex = String(size, radix: 16, uppercase: false)
                            let timeHex = String(Int(date.timeIntervalSince1970), radix: 16, uppercase: false)
                            let etag = "W/\"\(sizeHex)-\(timeHex)\""
                        response.setHeader("Etag", value: etag)
                    }
                }
                if let _ = customResponseHeadersSetter {
                    customResponseHeadersSetter!.setCustomResponseHeaders(response, filePath: filePath, fileAttributes: attributes)
                }

                try response.sendFile(filePath)
            }
            catch {
                // Nothing
            }
            response.status(HttpStatusCode.OK)
        }
    }

    public enum Options {
        case PossibleExtensions([String])
        case ServeIndexForDir(Bool)
