Path manipulation utils: addext.
Handled the tabs closing.