Fix bug trying to open folder.
Add fallback setting if resolving relative path from current file fails.