Take homedir by reference instead of copying