Overwriting a file with copy() should succeed (emulating the behaviour of http://php.net/manual/en/function.copy.php)