pathutil: Add Base type which helps prevent directory traversal vulnerabilities.