Improved 'go back' parent directory button logic and rendering