Added in checking of the need for a backup dir