Correctly switch directory