Fix to allow passed home directory variable to work.