Fixes behavior of getActiveFile/Directory when a non file-backed tab is active
Merges with upstream