When a directory is deleted while the user is inside it, the terminal
should automatically return to the parent directory.
#### Expected behaviour
When a directory is deleted while the user is inside it, the terminal
should automatically return to the parent directory.
```
user@domain:~/test$ mkdir ~/test && cd ~/test && touch foo && ls
foo
user@domain:~/test$ rm -r ~/test
user@domain:~/$
```
#### Actual behaviour
The terminal remains in the deleted directory's path, even though the
directory no longer exists.
#### Steps to reproduce the behaviour
Create a new directory and navigate into it:
```
user@domain:~/test$ mkdir ~/test && cd ~/test && touch foo && ls
foo
```
Delete the directory while still inside it:
```
user@domain:~/test$ rm -r ~/test
```
#### MATE general version
1.26.0
#### Package version
1.26.0
#### Linux Distribution
Trisquel 11