Implement preliminary support for the TempURL feature

Fixes #337