use git-config achievement.dir for publishing

Before this change:
* `git-achievements -p' assumes index.html and index.css
  live in the same directory as the script.

After this change:
* git-achievements can be installed in a system directory
  accessible to all users

* We use `envsubst' to expand environment variables, so
  a single path, such as $HOME/repos/git-achievements,
  can be used on hosts with different home directories.

  Example:
  User "foo" routinely switches between two hosts, A and B.
  On host A, $HOME expands to /home/foo.
  On host B, $HOME expands to /rhome/foo.

Fall-back behavior:
* If the user does not specify achievement.dir in .gitconfig,
  git-achievements falls back to original behavior.
document the use of achievement.dir
update testscript to use achievement.dir
better error-checking while publishing

Scenario:
* git-achievements is in system-wide, read-only dir
* user has not set achievement.dir in .gitconfig

Resolution:
* Suggest command, then bail non-zero
Count git commit's option --staged as well as --cached
Count git help [command] as well as git [command] --help
Record achievements even if all the output is not read.

- Ignore PIPE signals that may come through if the user quits out of the
  pager in commands like 'git log'.
Small fix for multiple symlink handling / better path reading

Signed-off-by: Pierre-François CLEMENT <likeyn@gmail.com>
Shouldn't force the --global option for retrieving email, as it depends on the user's configuration

Signed-off-by: Pierre-François CLEMENT <likeyn@gmail.com>
Revert "Small fix for multiple symlink handling / better path reading"

This reverts commit 49820ad4a201ab73966f2d61e0adff2af7804aa5.
Handles multiple symlinks and works on OSX

Signed-off-by: Pierre-François CLEMENT <likeyn@gmail.com>
Shouldn't specify --global option not to override user's configuration

Signed-off-by: Pierre-François CLEMENT <likeyn@gmail.com>
Make changes consistent with the original codestyle

Signed-off-by: Pierre-François CLEMENT <likeyn@gmail.com>
Get rid of --global options
Merge branch 'gravatar-email' of https://github.com/Likeyn/git-achievements into gh-pages
Merge branch 'follow-symlinks' of https://github.com/Likeyn/git-achievements into gh-pages
Merge branch 'ignore-pipe' of https://github.com/datalogics-kam/git-achievements into gh-pages
Merge branch 'gh-pages' of https://github.com/AMDmi3/git-achievements into gh-pages
merge
merge