Switch to HOME directory when chdir failed.