Updates to some AzCore functions a while ago made some path functions strip off a trailing slash, which caused bad paths to be used when loading middleware data. Updated the code to use better path APIs.