How to execute the Keep Both Files operation using PHP. Inspired by http://stackoverflow.com/a/14081609/80353