public static function prepareDirectory($directory, $mode = 0775)
    {

        // make the passed directory OS compliant
        $toBePreapared = Setup::prepareOsSpecificPath($directory);

        // make sure the directory exists
        if (is_dir(dirname($toBePreapared)) === false) {
            mkdir(dirname($toBePreapared), $mode, true);
        }
    }