Revert "Revert "FileUtils::normalize_path bugfix when path ended in '/..'""

This reverts commit 24f4bb3199761d1ed9f170c4d3b78d7bdf3eda70.
Catch case when subpath becomes ''