Fixes "unarchive" and "copy" do not expand pathes correctly

Proposed fix for #6061. 
I'm new to Ansible and Python, so please be gentle. :)