Fix normalization of relative paths

Related to #1759