Fix files_encryption app upgrade from 4.5 to 5.0

This PR will fix the re-encryption of legacy encrypted files to the new encryption as reported in #3547