rustdoc: Check for href when prepending rootPath

Fixes the JS error at least. I don't know if there's a more underlying issue that needs addressing.