This fixes issues where the full URL of our directory path changes, also it moves files into documents instead of caches, and ensures PDFs are downloaded before opening.