Portable battery script

Only for osx now.