LEOPOLDBLOOM This would undoubtedly be a useful little tool, but I feel compelled to point out that there's another free app called SmartSleep that can be set to automatically revert to the slower sleeping method (writes contents of memory to disk) when the battery is below 20%, which is, IMO, a little safer than risking losing anything you may have forgotten to save.
(Version 1.0)