Arrange for a package to know its directory path during loading.