Tests and bugfixes

* Fixed unit tests
* Fixed memory errors under Mac OS X due to different Passwd structure
  format
* Added null safety guarantees to Passwd::info() method