Symlink 404 cache files atomically to avoid potential race condition.

See websharks/quick-cache#242
Fix bug and improve code in 404 symlink creation.

See websharks/quick-cache#242
Merge branch 'feature/242' into 000000-dev