Copy action_plugin: encode content when dict.
Copy action_plugin: encode content when dict.

When content is processed and found to be valid JSON it is decoded into a dict. To write it out to a file we need to encode it back into a string.

Addresses GH-5914.

thaim/ansible,thaim/ansible