Moved HomeDir class to api.