Major overhaul of battery script. Factored out directory filename seraching to own function. cleaned up comments. added dir not found excpetion. Corrected spacing between commas.