Improved copying function that copies files between two location. Now this function makes sure the location structures exist before it attempts copying