More reliable relative path handling