Added utility function for file/directory copy