Some functions to normalize path information
Source: