Add very rudimentary base path detection.