public function put($path, $contents)
    {
        $directory = dirname($path);
        $this->createDir($directory);
        $path = $this->getPath($path);
        if (!file_exists($path) && !is_writable(dirname($path))) {
            throw new RuntimeException(dirname($path) . ' is not writable');
        }

        if (file_exists($path) && !is_writable($path)) {
            throw new RuntimeException($path . ' is not writable');
        }

        return file_put_contents($path, $contents);
    }