Rewrite gistore in ruby

In order to backup arbitrary entries (files and dirs), previous
version of Gistore will mount the backup entires in the worktree,
and this is not a good idea. Because mount operation always needs
root privilege, running gistore always needs to run as root user.

Since git above v1.8.2 has wildmatch gitignore support, I feel
maybe Gistore can be reimplemented using gitignore instead of mount.
The reason that I rewrite Gistore in ruby is because I use ruby
heavily for the recent years, and especially I find thor (a wildly
used toolkit for command-line interfaces) can make this reimplementation
quickly and easily.

Significant changes about this version:

  1. Rewrite Gistore in ruby instead of in python.

  2. Using thor [1] for the command-line interface.

  3. Write test cases using the same framework as git.git.

  4. More subcommands, such as export-to-backups, restore-from-backups.

[1]: https://github.com/erikhuda/thor

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Refactor: add is_git_repo? method in utils

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Not fail if no privilege to commit something

Grep one more commit error output: /nothing added to commit/

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Bugfix: checkout failed if not set gitdir

If not set gitdir, it will affect current repository!

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Call safe_system which borrow from homebrew

New safe_system method which is a wrapper for fork and exec, and will
raise Exception if command return false.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
New Tty class for pretty output

Tty class is borrow from homebrew.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Update gistore using subcmd: gistore update

Add new subcommand: update, which is borrowed from homebrew.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>