Added patch to create backup directory if it doesn't exist