On Linux calculate battery stats only if battery data available
Merge pull request #4 from tjormola/master

Fix perl warnings when running with defaults on Linux on a machine with no battery