Set file permissions of new file = old file

File permissions for the new file are set to the same value as for the old file and no longer to 644. 

As a result there is no chance that the plugin influences the security concept of the web server. For example, on my web server any files that are uploaded with WordPress automatically get the right permissions which are '660'. Some time before I noticed that there was a handful of files that had '644', but: Why?. It took me quite a while to find out that those files were uploaded with Enable Media Replace.

With this change the file permissions are remaining untouched, the plugin 'only' does what it should do: Replacing a file.