Fix  error 500 for relative paths
Significantly speed up XHTML export by fixing broken locale cache