Cleaned up and enhanced support for file extensions in path.php.