Some minor cleaning up [ci skip].
Fixed the issue with a deleted file being wrongly added to the list of
recent files when closing its tab (closes #408).