Merge pull request #87 from dolmen/fix/batt

Optimize _lp_battery: no sed
git: fix variable leaks
_lp_git_branch: faster (less external programs calls)