src/Environaut/Checks/Validator.php
public static function fixRelativePath($path_with_dots)
    {
        do {
            $path_with_dots = preg_replace('#[^/\.]+/\.\./#', '', $path_with_dots, -1, $count);
        } while ($count);

        $path_with_dots = str_replace(array('/./', '//'), '/', $path_with_dots);

        return $path_with_dots;
    }
public static function fixRelativePath($path_with_dots)
    {
        do {
            $path_with_dots = preg_replace('#[^/\.]+/\.\./#', '', $path_with_dots, -1, $count);
        } while ($count);

        $path_with_dots = str_replace(array('/./', '//'), '/', $path_with_dots);

        return $path_with_dots;
    }
Resolves dots and double slashes in relative paths to get
nicer paths: "dev/data/assets/../../foo" will be "dev/foo/"
and "foo/./bar" will be "foo/bar" etc.

@return string