make free_homedir availible to memory.c
Fix silly style typo
Make init_homedir availible to unittests