Update the files under the public directory upgrading

Hello,

This pull request allows updating the files under the `public` directory when upgrading an application through `bin/rake rails:update` (just like files under `config` and `bin`). As far as I can see, there is no way to test this feature so I've tested with an application pointing to my local repository and everything seems fine. 

Fixes #13499.

Have a nice day.