In paths.py, fix normalize_path so empty input returns '.', repeated slashes
collapse to one '/', and trailing slash is removed except for root '/'. Add or
update tests in test_paths.py to cover those cases.
