Resolve base path