Alex Smith and his 49ers looked awful on Bill Walsh Field until the very last minute. Arnaz Battle scored on a 1-yard end-around with 22 seconds to play, and the 49ers emerged from an awful offensive night with an 86-yard scoring drive to cap a 20-17 victory over the Cardinals in the NFL's final opener Monday night.