Fix path appending to not append /. or /.. components.