Make sure history.jsp doesn't strip off too much when creating a relative path name.

Fixes #649.