added a way to get homedir.