Added unit tests for modified copy_file()