Initial implementation of essync tool

I'm happy to improve this if there's a better way, but It was lifted wholesale from charmd. So we might want to consider improving that too.