Python smart backup script