Bug fix

Fixed a problem where a backup file would be created even if the
directory move failed.