states.file: rewrite to avoid using the `copy` module, which conflict w/ new copy() func

************* Module salt.states.file
E0102:1992,0:copy: function already defined line 139