Resolve relative paths correctly