[COOK-3988] Don't unescape URI before constructing it.

However, unescape it while constructing the file cache's filename.

Also, remote_file resource now understands FTP URLs, so support that as well.