backup-dir renamed to backup; function exports added