Normalize path to handle "~", etc.