Change buildModuleUrl to always return an absolute URL.

Fixes #779.