Fix a bug with trailing slashes in URLs when installed in a subdirectory