Add in nif to get user home directory. Update code to use nif. Update tests.