Fix asset loading for URL-encoded paths.

Closes #316.