a little more robust

Made the code a bit more robust for other systems and for when batteries are removed and such.  I wasn't sure how you were updating the md5 (I'm installing this manually), so I'll leave that up to you!