add format-spec support in org-page

By default, format-spec is not enabled in emacs, you need to require it
if you want to use it.
refactoring some duplicate related to git

Add a new function which wraps shell command and returns the output as a
string. Mainly used for git related command.