Improve path-related error messages (#333)