Fix some issues with site path when serving in a subdirectory.