Added the private key directory update.
Fixed the friend model test to work on windows and unix.