Relative path resolving fix. Fixes #829