Improve path handling.