improve the way we get remoteExtPath for resources