fixup handling of the case where the API proxy is in a remote directory