Documentation

- Documented virtual tags.
Unit Tests

- Fixed hook tests to work on released code (thanks to Jakub Wilk).
Bug #1194

- Fixed bug #1194, so that $HOME has precedence over the passwd db when looking
  for the user's home directory (thanks to Jakub Wilk).