safecopy.py: a safe copy function in python

Signed-off-by: Gui Chen <gui.chen@intel.com>