Implement preliminary support for the TempURL feature (fixes #337)