Fix errors in persistent home dir, close issue #28