Implement an OO way to change directory