[enc] remember original fopen access type in pre-proxy

remember original fopen access type in pre-proxy because sometimes they change during the fopen call, e.g. 'r' becomes 'r+' if we open an URL.

This fixes failing downloads of unencrypted files while encryption is enabled from a ftp mount.

@PVince81 this could also solve the webdav problems we discussed yesterday, but at the moment I don't have a webdav to test. Will try it tomorrow.

@ser72 This could also solve the S3 issue you reported #7428. Maybe you can give it a try...