Fix for the trailing slash when the "path" is empty