Remove trailing / from relative paths, update PagedTiffHandler and SemanticMediaWiki