Make battest.sh more efficient

I used egrep to reduce the number of times ioreg is called, which ironically reduces battery usage.