[builtin] fix activatewindow if directory path differs

After #5081 the built-in "activatewindow" does not work if you stay for example in the video window and you want to activate the same window with a different path.
This fixes the issue by comparing the directory path of the current active window with the given directory path of activatewindow.
Merge pull request #5490 from xhaggi/fix-built-in-activatewindow

[builtin] fix activatewindow if directory path differs