Parse paths more correctly.