[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.
!params.empty()