[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 download 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 momen I don't have a webdav to test. Will try it tomorrow.

@ser72 This could also solve the S3 issue you reported #7428. Maye you can give it a try...