Backup the output file if it already exists

Fixes #39
Replace call to older API of FileX